1
votes

My web application allow the user to upload their image to view, and I want to compress the image before display them. What are good lossy image compression algorithm out there. I research around and this page here http://www.imageoptimizer.net/Pages/Home.aspx, does it perfectly. My image was 670KB and after the compression, it was only 150KB and the quality are almost the same.

1
JPEG did include some very serious mathematical minds to get it going, you do not say anything about losing or not the quality. JPEG does have a lot of properties to tune. imageoptimizer is a well know suit w/ quite a few optimization, they still return jpeg, though.bestsss
@bestsss: Sorry for being vague. What I try to accomplish is that the compress hopefully dont degrade the image too much and reduce the size of it. I think I will try to follow @Uriah suggestion and try javax.io. Thank youThang Pham
@bestsss That is a good point, there are ways of reducing the file size of an image by stripping out data that you are not interested in. For most run-of-the-mill JPEG images from a digital camera you might have 10-30K in EXIF data. Pro images may contain ICC profiles that can be several hundred K in size. XMP data added by Photoshop can be heavyweight too.Uriah Carpenter

1 Answers

3
votes

JPEG is the de facto compression algorithm for photographic images.

For line-art type images it's common to use PNG or GIF format.