PHP Classes
elePHPant
Icontem

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 (11 years ago) RSS 2.0 feedStarStarStar 55%Total: 2,790 All time: 1,301 This week: 894Up
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
Winner


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
Picture of Huda M Elmatsani
Name: Huda M Elmatsani <contact>
Classes: 14 packages by
Country: Indonesia Indonesia
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  
 0%
Total:2,790
This week:0
All time:1,301
This week:894Up
 User Ratings  
 
 All time
Utility:77%StarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:81%StarStarStarStarStar
Tests:-
Videos:-
Overall:55%StarStarStar
Rank:1593