Page 1 of 1

Image Resize Blurry / Jagged

Posted: 2016-04-03T22:59:06-07:00
by ravinder
I am converting gif from the pdf, but after gif conversion the quality if the image is not good, text are blurry and not properly readable.

I am shrinking the pdf and using -resize value 32%. i have to generate small image as compare to pdf hence i need to resize. please suggest on it.

$cmd = '/usr/local/bin/convert -debug All -pointsize 72 -trim +repage -density 300 -resize 32% -quality 100 -append -transparent "#FFFFFF" new.pdf test1.gif';
exec($cmd, $output);


Thanks,
Ravinder

Re: Image Resize Blurry / Jagged

Posted: 2016-04-03T23:10:52-07:00
by fmw42
You should read your input PDF before any operators (-trim, -resize, -append, -transparent) for proper IM syntax. See http://www.imagemagick.org/Usage/basics/#cmdline

I do not know that -pointsize does anything nor -quality. The latter does not affect gif, since there is no compression..

Try (I presume your PDF input is multipage)

Code: Select all

convert -debug All -pointsize 72 -density 300  -background "#FFFFFF" new.pdf -trim +repage -resize 32% -append -quality 100 test1.gif
If that does not work, increase the density and if you want, then decrease the resize % proportionally. This will get a better readable gif output. You should be able to remove -pointsize and -quality and get the same result.