Image embedding fails after imagefile name change

Bug #225971 reported by jharker
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Unassigned

Bug Description

This bug may be related to bug #167819, although that bug was supposedly fixed in 0.45.1 but this bug still exists in 0.46. I'm running Ubuntu 8.04 with Inkscape 0.46.

To reproduce this bug:

1. Create a directory somewhere. I'll call this directory /home/user/Desktop/tmp.
2. Put an image there. You can use the attached image, but I think any image will do. Call the image test.png.
3. Open a new document in Inkscape.
4. Import the image test.png using File->Import (or just drag-and-drop).
5. Save your file in the same directory as an Inkscape SVG. For example, /home/user/Desktop/tmp/foo.svg.
6. Now, go to the file test.png and rename it to test-new.png.
5. Right-click on the image of test.png in Inkscape, and select "Image Properties".
6. Change the image URL to reflect the new name, i.e. test-new.png. The image in Inkscape will render correctly when you've updated the name properly.
7. Close the "Image Properties" window.
8. (optional) Save the file again.
9. On the menu, choose Effect->Images->Embed All Images...
10. On the pop-up window click "Apply".

A warning window pops up, saying something like:

"No xlink:href or sodipodi:absref attributes found, or they do not point to an existing file! Unable to embed image.
Sorry we could not locate /home/user/Desktop/tmp/test.png"

The important thing here is that it says "test.png" even though you changed it to "test-new.png".

*Addendum : With a little work I figured out that the problem is related to what _kind_ of path is provided for the image URL. If an absolute path is provided for the image, i.e. "/home/user/Desktop/tmp/test-new.png", then embedding works fine. However, if the path given is only a relative path, i.e. "test-new.png", then the embedding fails, claiming it can't locate "/home/user/Desktop/tmp/test.png".

Revision history for this message
jharker (harker) wrote :
Revision history for this message
Joshua Blocher (verbalshadow) wrote :

I have confirmed this happens and only with relative paths, absolute paths work fine.
Confirmed in SVN

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
reader4 (cbrace1) wrote :

This is also related to bug #168542 and bug #246721.

Revision history for this message
jazzynico (jazzynico) wrote :

Seems to be fixed by both Bug #246721 and Bug #386069.

Changed in inkscape:
milestone: none → 0.47
status: Confirmed → Fix Committed
ScislaC (scislac)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.