Thank you so much. This helps a lot. I have not played with the extension yet, but simply setting the object properties solves things, too. For some reason I always thought optimizeQuality would lead to a "high quality" appearance of the correct display, instead of switching the rendering to optimizeSpeed.
Just for my own understanding: This object property is something that gets saved when exporting the svg to a pdf or eps again, correct? Do pdf/eps viewer then render the bitmap according to whichever property was set? Does that mean that eps/pdf viewer which do not read this property, might render the bitmap with interpolations again, i.e. depending on the viewer program the bitmap might appear blocky or smoothed? That would also mean that the original image/pixel information always gets exported to pdf/eps, but it is only the rendering which make them appear differently, correct?
Ideally, I would like to produce eps and pdf that will always show the bitmaps blocky (at least when having a zoomed image with very large pixels), independent of the viewer program.
Thanks a lot! Enno
On Wed, Oct 14, 2015 at 4:24 PM, su_v <suv@...2638...> wrote:
On 2015-10-14 08:36 (+0200), Enno R. Oldewurtel wrote:
When I import an eps that contains a bitmap (e.g. an eps generated from a MATLAB figure, that also has an image displayed), the bitmap in the imported form does not show the original pixels anymore but suffers from compression artefacts. These artefacts are not very visible for large image with small pixels relative to the total image size.
However, I often need to display zoomed regions of microscopy image, where those compressions are having quite a detrimental effect on the import. As an example I created a MATLAB figure with 10x10 random pixels. I attach the svg file where I imported the MATLAB figure after saving it as a PNG within MATLAB and another import of the eps file that I saved with MATLAB. The artefacts are clearly visible. ;)
Most times the compression is probably great to reduce overall file size, but in occasions like the ones described above it would be great to have a different or no compression of the bitmaps during import.
See the discussion e.g. in the comments of this report:
- “Interpolation while viewing in-file bitmap image” https://bugs.launchpad.net/inkscape/+bug/1418038
It should cover the new rendering options for bitmap images in Inkscape 0.91, both when importing a bitmap image directly, as well as when importing foreign vector formats with embedded bitmap data.
As workaround for bitmap images embedded in imported EPS/PS files in Inkscape 0.91, you can install and use the extension attached to this report:
(The extension will be available as 'Extensions > Images > Set Image Attributes'; just enable "[x] Render images blocky" on the 'Basic' tab, and apply)
Also related (see comments 11 and 12):
- “discrete color scale bitmap becomes continuous object after eps/pdf
export” https://bugs.launchpad.net/inkscape/+bug/1174651
hth, V
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user