PHP Classes

JPEG Reducer: Reduce a JPEG file size adjusting its quality

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2004-11-24 (14 years ago) RSS 2.0 feedStarStarStar 55%Total: 2,818 All time: 1,328 This week: 319Up
Version License PHP version Categories
jpegreducer 1.0.0Freeware3Graphics, Compression
Description Author

To reduce the size of JPEG image file, usually the image is saved with lower quality compression factor.

However, using this method it is not guaranteed that the size of the resulting image file will be smaller than a given size limit.

JPEG Reducer is a class that solves this problem by trying different quality to determine the ideal compression ratio to reduce image to the target limit size just by specifying that limit value in class variable.

This class can be used in public photo gallery to make sure all images are have acceptable size.

Innovation Award
PHP Programming Innovation award winner
November 2004

Prize: One downloadable copy of Roadsend PHP Compiler
Sometimes it is necessary to limit the size occupied by the files of image archives to prevent that they take too much disk space.

The size of JPEG image files can be reduced by using a lower quality factor when saving to a file but it is not easy to determine what is the smallest quality factor reduction that guarantees that an image file will not exceed a given limit.

This class provides an approximate solution based on a few tests using different quality factors and then using interpolation to reach a reduction factor close to the ideal value that can be used to keep the file size near the limit.

Manuel Lemos
Name: Huda M Elmatsani <contact>
Classes: 14 packages by
Country: Indonesia Indonesia
Age: ???
All time rank: 151 in Indonesia Indonesia
Week rank: 194 Down5 in Indonesia Indonesia Down
Innovation award
Innovation award
Nominee: 5x

Winner: 3x


  Files folder image Files  
File Role Description
Plain text file class.jpegreducer.php Class class reduce jpeg filesize
Plain text file class.jpegxreducer.php Class variant
Accessible without login Plain text file test.jpegreducer.php Example example
Accessible without login Plain text file test.jpegxreducer.php Example example: one line call

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,328
This week:319Up
 User Ratings  
 All time