Hello,
When I drag and drop a jpg image to a project I get the option to either link or embed it. If I choose embed, the image is recompressed to a lower quality than the original. If I instead choose to link the image and then use the Extensions > Images > Embed image menu choice, the image is embedded without additional compression.
Is this intentional, a bug, or am I just doing something weird?
Extensions>Images>Embed vs Drag/drop-embed of jpeg
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
Hi Mar,
That's interesting. I'm sure other more knowledgable members will be able to explain it.
I can't explain it, but I've been working with an embedded JPG. So I tried importing it again, side by side, and this time linked instead of embedded. I can't tell any difference visually. How have you determined that it's compressed? Do you see a visual difference, or is it after saving that you notice a difference in file size?
That's interesting. I'm sure other more knowledgable members will be able to explain it.
I can't explain it, but I've been working with an embedded JPG. So I tried importing it again, side by side, and this time linked instead of embedded. I can't tell any difference visually. How have you determined that it's compressed? Do you see a visual difference, or is it after saving that you notice a difference in file size?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
If the source JPEG (jpg) file remains in its folder -- then linking is the way to go. I'm not aware of any degradation of the jpeg information, however this might be possible.
The only reason I can think of for embedding a JPEG/jpg file into a document is if the SVG file ends up sent to another person. This gets rid of the need to attach additional bitmaps.
Can anyone else suggest a reason why a jpg should be embedded? Seems to only bloat the file size unnecessarily.
Thoughts?
The only reason I can think of for embedding a JPEG/jpg file into a document is if the SVG file ends up sent to another person. This gets rid of the need to attach additional bitmaps.
Can anyone else suggest a reason why a jpg should be embedded? Seems to only bloat the file size unnecessarily.
Thoughts?
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
I use Inkscape to produce PDF-files and like to keep the blueprint in one spot, quite simply. Also, the issue is that while drag-and-drop-embedding lowers the image quality, choosing the option from the menu does not.
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
Referring to image quality as displayed in Inkscape on-canvas, in an exported bitmap of the drawing, or in the produced PDF file?Mar wrote:I use Inkscape to produce PDF-files and like to keep the blueprint in one spot, quite simply. Also, the issue is that while drag-and-drop-embedding lowers the image quality, choosing the option from the menu does not.
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
You don't tell how you determine or confirm that "the image is recompressed to a lower quality" in Inkscape (unless you extract the embedded image again (with 'Extensions > Image > Extract Image…') and check the compression level in an external image viewer). Or again, you are referring to the generated PDF file and the information you extract from the PDF file about embedded images in that file.Mar wrote:When I drag and drop a jpg image to a project I get the option to either link or embed it. If I choose embed, the image is recompressed to a lower quality than the original. If I instead choose to link the image and then use the Extensions > Images > Embed image menu choice, the image is embedded without additional compression.
With regard to compression levels of JPEGs: those do not carry over to PDFs generated with Inkscape (AFAIU there's no difference whether the bitmap image was embedded or linked into the SVG document):
- Bug #168708 “Embedded jpg exported to EPS/PDF as non-jpeg (JPEGs are stored /FlateDecode instead of /DCTDecode)”
Could you attach such an unedited JPEG image (of the kind you want to embed in the SVG file) here, to allow testing on other platforms whether there are differences in the image code embedded in the SVG file itself- depending on the method used for embedding (internal, or via python-based extension)?
Which Inkscape version do you use, on which platform?
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
~suv wrote:A known difference (in formatting only) between embedding a bitmap image via 'Drag&Drop' or 'File > Import…' and and the python-based 'Extensions > Image > Embed Image…' is described in this (otherwise unrelated) comment.Edit: actually I was thinking about a different comment/question, but failed to find it :/You don't tell how you determine or confirm that "the image is recompressed to a lower quality" in Inkscape (unless you extract the embedded image again (with 'Extensions > Image > Extract Image…') and check the compression level in an external image viewer). Or again, you are referring to the generated PDF file and the information you extract from the PDF file about embedded images in that file.Mar wrote:When I drag and drop a jpg image to a project I get the option to either link or embed it. If I choose embed, the image is recompressed to a lower quality than the original. If I instead choose to link the image and then use the Extensions > Images > Embed image menu choice, the image is embedded without additional compression.
With regard to compression levels of JPEGs: those do not carry over to PDFs generated with Inkscape (AFAIU there's no difference whether the bitmap image was embedded or linked into the SVG document):
- Bug #168708 “Embedded jpg exported to EPS/PDF as non-jpeg (JPEGs are stored /FlateDecode instead of /DCTDecode)”
Could you attach such an unedited JPEG image (of the kind you want to embed in the SVG file) here, to allow testing on other platforms whether there are differences in the image code embedded in the SVG file itself- depending on the method used for embedding (internal, or via python-based extension)?
Which Inkscape version do you use, on which platform?
Hello!
I'm sorry it took this long to respond, I had forgotten about the issue (or learned to work around it rather.)
Take a look at the following image:
Compare the JPEG artifacting of the rightmost window to the two other. There should be a noticable difference.
Original test image:
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
Mar wrote:Compare the JPEG artifacting of the rightmost window to the two other. There should be a noticable difference.
Original test image: (…)
Thank you for the detailed information (screenshots & original JPEG image). Based on it I have been able to reproduce it. Then I recalled a bug recently filed about this (Bug #871563 in Inkscape: “JPG pasting in trouble with resolution”) and confirmed it.
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
Aaahhh....
When I tested it, I did not zoom in at all. Since ~suv has confirmed the bug, I won't test further. But I do see that the one on the right is a little different, in your screenshots.
When I tested it, I did not zoom in at all. Since ~suv has confirmed the bug, I won't test further. But I do see that the one on the right is a little different, in your screenshots.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
If it is of some interest for someone, I have faced the same problem with Inkscape 0.48.1: when the imported image is linked -> no pb, but when it is embedded -> quality loss
I updated to 0.48.2 and the problem is still here.
I updated to 0.48.2 and the problem is still here.
Re: Extensions>Images>Embed vs Drag/drop-embed of jpeg
Welcome to the forum
I have a couple of questions. Is this also with JPGs that you notice this? Also, what is "pb"?
(Note that it may take years to fix some bugs. It depends how critical it is, and I think also how often it's been reported. You could follow the above link to the bug report to somewhat follow the progress.)
I have a couple of questions. Is this also with JPGs that you notice this? Also, what is "pb"?
(Note that it may take years to fix some bugs. It depends how critical it is, and I think also how often it's been reported. You could follow the above link to the bug report to somewhat follow the progress.)
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design