Iphone reduce Image file size
Is there anyway to reduce the Image file size开发者_开发知识库 or Raw RGB buffer ?
Actually I have RGB buffer which it has 500KB with 320X420 size.I tried to save it to disk using UIimage and it comes to 240 KB.
As per the image size, I want it to have less than 50KB or so.(loosing quality is OK)
Is it possible ?
Thanks,
Raghu
See Trevor Harmon's excellent post on the subject.
The 240KB size sounds exactly like the raw RGB image data, uncompressed (320x420x3). Doesn't the iPhone have a PNG or JPEG exporter? The internet says to use UIImageJPEGRepresentation or UIImagePNGRepresentation and NSData writeToFile.
精彩评论