Your original pdf is smaller than the thumbnail you created. Imagemagick scales the image to the requested size. Use the following options:
convert -scale '800x800+0+0>' -colorspace rgb -strip in.pdf[0] out.png
The final > in the scale option tells Imagemagick not to scale the image to the size of the original.
Edit: Imagemagick uses Ghostscript to render PDF files. You can directly use Ghostscript if you need to set some parameters, for example resolution, to get the best image. The default resolution is 72 DPI, which means A4 paper is 595 x 841 pixels. With 150 DPI, you get twice as many pixels. For example.
gs -q -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dMAxBitmap=500000000 -dAlignToPixles=0 -dGridFitTT=0 -r150x150 -sOutputFile=out.png in.pdf
The above command is almost identical to the one used by Imagemagick. Note the -r option, which sets the resolution to 150 DPI. You can use ImageMagick to scale the resulting image to a smaller size.
Using a higher resolution will reduce blur when resizing an image.
jmz
source share