Login   Register  
PHP Classes
elePHPant
Icontem

JPEG Reducer: Reduce a JPEG file size adjusting its quality

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (10 years ago) RSS 2.0 feedStarStarStar 54%Total: 2,729 This week: 1All time: 1,282 This week: 1,398Down
Version License PHP version Categories  
jpegreducer 1.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: 151 in Indonesia Indonesia
Week rank: 51 Down1 in Indonesia Indonesia Equal
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,729All time:1,282
 This week:1This week:1,398Down
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:86%StarStarStarStarStar
Documentation:-
Examples:79%StarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:1348