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    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 2,831 This week: 1All time: 1,334 This week: 560Up
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
Age: ???
All time rank: 161 in Indonesia Indonesia
Week rank: 106 Down3 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  
 0%
Total:2,831
This week:1
All time:1,334
This week:560Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:84%StarStarStarStarStar
Documentation:-
Examples:78%StarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2128