I need to be able to compress PNG files at run-time but can't find any libraries that are iOS ready that can do that. JPEG does is not a great fit for me because I need to the Alpha channel that PNG provides, and JPEG does not. Turning PNG crush into something I can use within my iOS project is probably beyond my skill/knowledge set when it comes to C.
Just to be extra-clear, I need to do this at run-time, not compile-time.
The best option to compress your PNG files without affecting image quality is using a program such as WinZip.
File compression for a PNG is lossless. Like the term indicates, lossless compression retains all of the data contained in the file, within the file, during the process. Lossless compression is necessary when you have images that are still in the editing process.
The biggest advantage of PNG over JPEG is that the compression is lossless, meaning there is no loss in quality each time it is opened and saved again. PNG also handles detailed, high-contrast images well.
Both PNG and TIFF files benefit from lossless compression, meaning that no matter how often you save, open, or resize them, they'll maintain their quality.
Try ImageIO. See ImageIO Programming Guide
Have you tryed UIImagePNGRepresentation
?
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/c/func/UIImagePNGRepresentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With