Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #322 > unrolled thread

downsampling to a specific resolution with ghostscript

Started byMatteo Gamboz <gamboz@medialab.sissa.it>
First post2011-09-07 16:42 +0200
Last post2012-01-06 23:04 -0800
Articles 2 — 2 participants

Back to article view | Back to comp.lang.postscript


Contents

  downsampling to a specific resolution with ghostscript Matteo Gamboz <gamboz@medialab.sissa.it> - 2011-09-07 16:42 +0200
    Re: downsampling to a specific resolution with ghostscript Cem <cem@schoolsparks.com> - 2012-01-06 23:04 -0800

#322 — downsampling to a specific resolution with ghostscript

FromMatteo Gamboz <gamboz@medialab.sissa.it>
Date2011-09-07 16:42 +0200
Subjectdownsampling to a specific resolution with ghostscript
Message-ID<j47vs9$uac$2@speranza.aioe.org>
Hi all,
    I have this problem: I need to downsample images in a pdf file to a 
resolution in the range 150-220.
Even if there is no bug in ghostscript, I cannot get images with 
resolutions between 221-299dpi down to my range.

Basically I tried with
gs -o out.pdf -sDEVICE=pdfwrite -dDownsampleColorImages \
-dColorImageResolution=150 x.pdf
and played a bit with the resolution, ColorImageDownsampleThreshold and 
ColorImageDownsampleType but without any luck

AFAICT, gs seems to downsample only to resolutions that are an integer 
factor of the original resolution (or something close to that).
For instance, for a image with original resolution of 300dpi, I can get 
down to 50, 60, 75, 100, 150.
For one with original resolution of 251 (a prime number), I can get down 
to 50 (where 50x5=250), 62 (where 62x4=248), 83, 125. But for any target 
resolution from 126 to 249 I always get 251 (i.e. no change).

Maybe what I need is more correctly called "resample".


Does anyone know any trick I could use here?

Thanks
m




P.S. I posted this also on gs-devel mailing list, but maybe here is more 
appropriate

[toc] | [next] | [standalone]


#548

FromCem <cem@schoolsparks.com>
Date2012-01-06 23:04 -0800
Message-ID<3767631.1827.1325919853286.JavaMail.geo-discussion-forums@yqnb23>
In reply to#322
Matteo - Did you find a solution to this?  I am having the same issue.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web