Page 1 of 1

how to sharp and image using convert options

Posted: 2017-01-10T05:47:02-07:00
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

Re: how to sharp and image using convert options

Posted: 2017-01-10T07:39:54-07:00
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.

Re: how to sharp and image using convert options

Posted: 2017-01-10T11:12:27-07:00
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