[solved] Embedded bitmap saved as pdf is blurry

Post questions on how to use or achieve an effect in Inkscape.
Estair
Posts: 4
Joined: Wed Aug 07, 2013 1:57 am

[solved] Embedded bitmap saved as pdf is blurry

Postby Estair » Wed Aug 07, 2013 2:16 am

Hello,

At the moment I'm trying to create a vector image with an embedded bitmap and save it as a pdf. This way I can easily work with it in latex. The problem is that I want to maintain the bitmap as it is (so you can see the pixels as a group of squares). The problem is that when I open it in adobe reader (or Foxit reader), the bitmap is blurred. Turning off 'smoothing images' in adobe reader does not resolve the issue. What makes it even stranger is that when the article is created in Texmaker, this blurring does not occur, what makes me think that the problem is not with inkscape..

I already read a lot about this. I tried to rasterize the image but this never gives good results.

Any ideas?

Thank you in advance,
Kind regards,
Frederik

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Embedded bitmap saved as pdf is blurry

Postby Lazur » Wed Aug 07, 2013 7:22 am

Hello Frederik,

raster images embedded in pdf-s are jpeg compressed, no matter what they were originally.
I have not much experience with the saving as pdf, but I assume the blurring you mention is the result of that.
Could you upload an example of the problem so we can see it?

Estair
Posts: 4
Joined: Wed Aug 07, 2013 1:57 am

Re: Embedded bitmap saved as pdf is blurry

Postby Estair » Wed Aug 07, 2013 5:36 pm

Hi,

Thanks for your quick reply. I uploaded the orignal svg file (
Intensities3forum.svg
Original svg file (I deleted the graph above)
(29.25 KiB) Downloaded 548 times
) and the orignal svg file saved as a pdf (
Intensities3forum.pdf
Original svg saved as pdf
(11.46 KiB) Downloaded 495 times
).

If there's always a compression, there is no way to avoid this problem then? What's still strange, is that Techmaker shows the figure as it should be (as viewed in the svg file).

Kind regards,
Frederik

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Embedded bitmap saved as pdf is blurry

Postby Lazur » Thu Aug 08, 2013 8:07 am

Hello,

now I see, this has nothing to do with the compression.
The raster part embedded in that svg is 125/21 pixel sized.
So the blurring seems intentional to me to hide heavy pixelation of the image, which is otherwise scaled up to 775/130,162 in size.
Could't find a solution, nor think something could be done by any setting to turn it out to be good in a pdf reader.
On a side note the current development build of inkscape displays raster images this blurred when zoomed in too.
Tried to scale down all the image making the vector parts fit to the raster's original resolution,
thus making the 100% zoomed version "right", but that is too small to be legible.

The only thing to get close to that pixelated look, is
to scale up the raster image with a raster program, preferably with no interpolation.
This is how it looks with the raster image scaled to 775/130 in gimp:
hlp62.svg
(32.05 KiB) Downloaded 392 times

hlp62II.pdf
(21.52 KiB) Downloaded 326 times

Estair
Posts: 4
Joined: Wed Aug 07, 2013 1:57 am

Re: Embedded bitmap saved as pdf is blurry

Postby Estair » Thu Aug 08, 2013 7:00 pm

Hi,

Thanks a lot, in fact this is sufficient for what I am going to use if for.
If I see it correctly, the pixelated look could even be better if the image is scaled up even further?

Kind regards,
Frederik

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Embedded bitmap saved as pdf is blurry

Postby Lazur » Thu Aug 08, 2013 7:47 pm

Hi,

I don't think it's the best way to do so.

With these versions I auto-traced the raster parts, so it should look that "pixelated",
no matter how it is scaled.
hlp62II.svg
(193.21 KiB) Downloaded 350 times

hlp62III.pdf
(33.8 KiB) Downloaded 287 times


By the way some other things could be adjusted to make a much cleaner file.
Only changed the raster image part, but it appears to be below a grid,
some positioning is off and maybe stroke widths and overall sizes are better to be changed.

Good luck!

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Embedded bitmap saved as pdf is blurry

Postby hulf2012 » Fri Aug 09, 2013 2:55 am

Hello

I checked the original file, and had the same results when exporting to pdf ... but if I make a bitmap copy of the clipped Image (configured at 90 dpi), then save as pdf (maybe let unchecked the raster filter option), then the bitmap copy aproximates more to what you expect, the black line appears... less blurred to my eyes, until you zoom in.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Estair
Posts: 4
Joined: Wed Aug 07, 2013 1:57 am

Re: Embedded bitmap saved as pdf is blurry

Postby Estair » Sat Aug 10, 2013 7:36 pm

Hi,

Thanks, can I just ask how you auto-traced the bitmap, I guess this is with another software?

Kind regards,
Frederik

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Embedded bitmap saved as pdf is blurry

Postby Lazur » Sat Aug 10, 2013 8:54 pm

Hello,

For the auto-trace I used the previously scaled up image from gimp, which was 775/130.
Then used inkscape's Paths>Trace bitmap option,
where set multiple scans, with the number of 256 scans.
As it was originally greyscale, that could cover the colour range.
Unticked all other options, and after it was done,
grouped the result together with a rectangle the size of 775/130, of a grey colour, behind the auto-trace.

alas
Posts: 1
Joined: Fri Aug 23, 2013 11:15 pm

Re: Embedded bitmap saved as pdf is blurry

Postby alas » Sat Aug 24, 2013 1:52 am

Hi,

I just encountered this problem, and found a better solution. Open the pdf file in a text editor, find the line:

Code: Select all

/Interpolate true

And set it to false. There really should be an option in the pdf save dialog for this.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Embedded bitmap saved as pdf is blurry

Postby Lazur » Sun Aug 25, 2013 4:45 am

Hi,

nice found!

huangming6220
Posts: 1
Joined: Wed Mar 12, 2014 5:39 pm

Re: Embedded bitmap saved as pdf is blurry

Postby huangming6220 » Wed Mar 12, 2014 5:43 pm

I just figure it out.

To save svg which is embedded some bitmaps to pdf with high resolution bitmaps

File -> Inkscape Preferences -> Bitmaps -> Resolution for Create Bitmap Copy

set 6000 dpi

you will get good pdf with enough resolution for bitmaps.


Return to “Help with using Inkscape”