0
votes

Does anyone know if any JPEG compression library that produces 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...

2
There's a CPU-time trade-off involved here. The more CPU you have to expend on the problem, the better you can do, especially with image and video compression. The problem is that the iPhone has a limited amount of CPU to expend on the task, which is why the images are so large. - Michael Kohne
Just to make sure, you have filed a bug with Apple requesting this feature, right? If you haven't, please do so. - Stephen Canon
Yup, filed a report in radar. No response. ;) - Sulka

2 Answers

1
votes

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.

0
votes

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.