I have a small PDF file which is defined as being 47 points wide by 48 points high.
When I use imagemagic to convert this file to a png I am not able to get the resolution any higher than 47px x 48px.
In other words, if I make a png which is 200 px high, the resolution is very bad.
I have tried using the -density option, but it doesen't help.
The pdf is a vectorfile, its not just an image put into a pdf, so I can scale it as much as I like, but I don't know how to do this using imagemagic.
It seems like imagemagic by default will max 1 pixel per point. How can I fix this?
In other words, how can I make a tiny vectorfile come out as a large high resolution image?
Low resolution when converting small PDF to png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
- Contact:
Re: Low resolution when converting small PDF to png
I am not sure about conversions between points and pixels. However, to get better quality the -density must be put before the pdf and you can use supersampling to increase the quality.
convert -density 288 image.pdf -resize 25% image.png
default density is 72, so 72*4=288 and then resize by 1/4=25%
You can increase the density as much as you want and change the resize to the output pixel size as desired.
If I misunderstand your issue, then please explain in more detail and perhaps provide links to example input and output. Also provide your command line and version of IM and platform.
convert -density 288 image.pdf -resize 25% image.png
default density is 72, so 72*4=288 and then resize by 1/4=25%
You can increase the density as much as you want and change the resize to the output pixel size as desired.
If I misunderstand your issue, then please explain in more detail and perhaps provide links to example input and output. Also provide your command line and version of IM and platform.
Re: Low resolution when converting small PDF to png
>However, to get better quality the -density must be put before the pdf...
Thanks, that worked!
I had allready tried the -density parameter but I had put it AFTER the input file;I didn't know that it would make a difference.
Putting it IN FRONT of the input file did the trick!
Thanks, that worked!
I had allready tried the -density parameter but I had put it AFTER the input file;I didn't know that it would make a difference.
Putting it IN FRONT of the input file did the trick!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
- Contact:
Re: Low resolution when converting small PDF to png
dala wrote:>However, to get better quality the -density must be put before the pdf...
Thanks, that worked!
I had allready tried the -density parameter but I had put it AFTER the input file;I didn't know that it would make a difference.
Putting it IN FRONT of the input file did the trick!
A number of settings, like density, need to be put before reading vector files because they have no intrinsic size. Otherwise for raster files, they should following the input.
Who is online
Users browsing this forum: No registered users and 29 guests