I am converting an image with ghostscript like this:
gs -sDEVICE=png16m -r75 \
-dNOPAUSE -dBATCH -dSAFER \
-sOutputFile="$output-%03dl.png" "$file"
On some images this takes forever (> 10 minutes).
If I use pdftoppm with defaults (therefore higher resolution) on the same image it takes less than a minute.
Can anyone tell why?
Thanks.
Not without seeing the offending PDF file, no. Quoting the version of Ghostscript might be instructive too. One possibility is that images are being interpolated which is an expensive operation, you could try -dNOINTERPOLATE