Subject: Re: reducing the size of an image
To: Ignatios Souvatzis <is@netbsd.org>
From: Gunther Nikl <gni@gecko.de>
List: port-amiga
Date: 06/11/2004 11:22:17
On Thu, Jun 10, 2004 at 09:31:34PM +0200, Ignatios Souvatzis wrote:
> Hi,
> 
> On Wed, Feb 18, 2004 at 10:41:35AM -0500, admin@datazap.net wrote:
> 
> > If I wanted to reduce jpeg's from a web interface would there be a better
> > option? I tried php4-gd, and it is just to slow. I am consider calling
> > djpeg -fast -scale 1/4 image.jpg | cjpeg > image_reduced.jpg from a php
> > script.
> 
> This is the correct way...
> 
> note that djpeg only supports -scale 1/2, 1/4 and 1/8 because it makes use
> of the 8x8 block nature of the jpeg data. That's why it is fast; it only
> does a partial inverse cosine transform, thus gets the scaling with less
> effort than pure decoding alone to the original size would be (and
> additionally, it saves the scaling operation).

  There exist a patch which changes -scale to scale N/8 with all N=1...16.
  The patch can be found here:

     http://sylvana.net/jpegcrop/

  Gunther