External JPG compression library for iPhone?
Does anyone know if any JPEG compression library that pro开发者_运维技巧duces decent image quality has been ported to the iPhone? The built-in algorithm inside UIImageJPEGRepresentation produces huge files (compared to the quality), which makes uploading images from the phone over the network much slower than necessary. I can compress a JPG compressed inside the iPhone to one tenths of the file size using GD built into PHP, without significant loss of quality...
Well. The GD library uses the iJPEG library for compression. So if you want the same quality you should use the same library:
http://www.ijg.org/
It's the most commonly used jpeg compression/decompression library btw.
I would like to know if there is a better library as well. I'm using .Net to compress jpeg images on the server and it does a much better job than the iPhone's UIImageJPEGRepresentation. I'd like to get them as small as possible on the iPhone before uploading as it a dreadfully slow process.
精彩评论