Image convert

How to convert pdf file to an image in command line

convert -density 150 input.pdf -quality 90 output.png
mogrify -resize 50% *

whereby:

- PNG, JPG or (virtually) any other image format can be chosen
- density xxx will set the dpi to xxx (common are 150 and 300)
- quality xxx will set the compression to xxx for PNG, JPG and MIFF file formates (100 means no compression)