lundi 2 mars 2015

How should I get UN-rotated JPEG image file from ghostscript?

I am running with crazy issue in ghostscript 9.15.I have two commands for converting PDF to JPEG images,which has difference in height and width only.


Command 1st



-q -dUseCropBox -dBATCH -dDOINTERPOLATE -dMaxBitmap=300000000 -dAlignToPixels=0 -dNOPAUSE -dSAFER -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dPDFFitPage -dPrinted=false -r144 -g200x200 -sDEVICE=jpeg -dJPEGQ=100 -sOutputFile="output.jpg" "input.pdf" -c quit



Command 2nd



-q -dUseCropBox -dBATCH -dDOINTERPOLATE -dMaxBitmap=300000000 -dAlignToPixels=0 -dNOPAUSE -dSAFER -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dPDFFitPage -dPrinted=false -r144 -g200x199 -sDEVICE=jpeg -dJPEGQ=100 -sOutputFile="output.jpg" "input.pdf" -c quit



As you can see, command has difference in -g parameter only.


In first command I have used -g200x200 and in second command -g200x199.


First command gives rotated JPEG while second command gives UN-rotated JPEG file.Is there any utility inside ghostscript which differentiate my command from height and width perspective.


How should I get UN-rotated JPEG image file by using same height and width(-g200x200) while converting PDF to JPEG image file ?


Aucun commentaire:

Enregistrer un commentaire