开发者

Iphone reduce Image file size

开发者 https://www.devze.com 2022-12-22 11:21 出处:网络
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 come

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消