[magick-users] problem downsampling -> convert -density

Glenn Randers-Pehrson glennrp at comcast.net
Wed May 22 09:54:48 PDT 2002


At 01:18 PM 5/22/02 +0200, Peter Vanroose wrote:
>> I would like to downsample pictures (tiff, jpeg) from 300dpi to 72dpi but can't get it to work.
>> I've tried several combinations of parameters and everything else like tiff
>> -> jpeg, geometry or colorspace seems to work.
>>
>> $convert -density 72x72 cmyk_300.tif neu.tif
>
>Well, you should think of a digital image as follows:
>
>= First of all, an image is just a rectangular pixel grid.
>  So suppose you have an image of 1500 by 2000 pixels.
>
>= Next, the image could be printed (on paper) or viewed (on screen).
>  For that purpose, you have to tell the printer software or the "display"
>  utility program how large an image pixel should be printed as.
>
>  Suppose you want a single image pixel for a single printer dot, at 300
>  dots per inch (dpi).  That means that the image will come out of the
>  printer with a size of about 5 inch by 6.6 inch (or 127 mm by 169 mm).
>
>  But the image file (normally) only knows about its pixel size (1500x2000)
>  not its size at which it should be printed (since you could as well print
>  it at double or half of the size; that's up to the printer software).
>
>= Now, some image formats (e.g. tiff) allow to store the "density", i.e.,
>  the real physical size of a pixel, as extra (header) information.
>
>= If you just change the DPI (density) info field of the TIFF file, with
>  the -density switch, the image still has 1500x2000 pixels, but the
>  printer software will probably print it out "enlarged" (factor 300/72).
>
>= If you just change the image size (by "resampling" the image, replacing
>  e.g. every 4x4 pixels by a single (average) pixel value), you obtain a
>  smaller image which looks about the same as the original (but will
>  normally be printed 4x smaller, if you keep the density value at 300dpi).
>  Use   -geometry "25%"   to do that.
>
>= Doing both -geometry and -density will probably give the desired result.

All good.  However, if you are using PhotoShop to determine what is the
resolution of the output image, be aware that PhotoShop ignores the
standard resolution tag and uses its own instead, which is embedded
somewhere in one of the "profiles" and does not get updated by ImageMagick.

Glenn



More information about the Magick-users mailing list