how to sharp and image using convert options

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ravinder
Posts: 14
Joined: 2015-11-05T23:49:44-07:00
Authentication code: 1151

how to sharp and image using convert options

Post by ravinder »

i am using following convert command to convert a pdf into png.while running this command the quality of the graphics inside png is very low and blurry.


convert -verbose -resample 150 -density 150 -trim +repage -sharpen 0x1.5 -quality 100 -append -transparent "#FFFFFF" "'.$pdf_file_name.'" "'.$gif_file_name.'"'

you can see the source pdf and converted png at below location

https://www.dropbox.com/s/9ru278jb17815 ... 4.pdf?dl=0

https://www.dropbox.com/s/e9g8tlhdvgwco ... 4.png?dl=0

please advise how to improve the quality of the graphics to make it more sharp and clear.

Thanks,
Ravinder
ravinder
Posts: 14
Joined: 2015-11-05T23:49:44-07:00
Authentication code: 1151

Re: how to sharp and image using convert options

Post by ravinder »

Although increasing the density is improving the quality but takes more to to generate image. hence what is the another option. please suggest.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how to sharp and image using convert options

Post by fmw42 »

If you want the resulting image to be 4x larger, then try

Code: Select all

convert -density 288 -units pixelsperinch 02_01_74.pdf -trim +repage -bordercolor white -border 10 02_01_74.png
If you want the image to be the same size, but sharper, try supersampling

Code: Select all

convert -density 288 -units pixelsperinch 02_01_74.pdf -trim +repage -resize 25% 02_01_74.png
Post Reply