Hi, On Wed, Feb 18, 2004 at 10:41:35AM -0500, admin%datazap.net@localhost 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). So no help there... if you need a different scale factor, you have to do djpeg | pnmscale | cjpeg, for example. Regards, -is
Attachment:
pgpNSnB5DZB22.pgp
Description: PGP signature