user1016265
user1016265

Reputation: 2397

GhostScipt - Can resize output image file

I'm converting pdf to html with help GS 9.04.

But in result i'm getting big file and it's ok for printing purpose. But for monitor screen i would like to have the same quality but smaller size.

Is it possible to make resize by GS and do not loose the quality ?

now i have the next code

gs \
 -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT \
 -r300 \
 -sDEVICE=pngmono \
 -dTextAlphaBits=4 \
 -dFirstPage={$page} \
 -dLastPage={$page} \
 -sOutputFile={$filename} \
  {$pdf}

and output file is good for printing. When i'm using -g option it makes crop. If i'm adjusting -r value it makes smaller and ugly at the same moment.

What i want to get is smaller image suitable and readable to looking on it via screen.

Upvotes: 2

Views: 2129

Answers (1)

KenS
KenS

Reputation: 31197

You can use a lower resolution which will generate a smaller output file. The fact that you prefer the high resolution image suggest that there is some kind of anti-aliasing or other image manipulation being performed on the image, Ghostscript can do this, by using 'interpolation' but its not really what its good at.

Ideally you would do this with an image manipulation package, but you can try the tiffscaled devices (on gs 9.04) to get an idea of what can be done. Personally I would suggest you use something like imagemagick to do the resolution reduction.

Upvotes: 2

Related Questions