Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法减少图像文件大小或原始 RGB 缓冲区?
实际上我有 500KB 大小为 320X420 的 RGB 缓冲区。我尝试使用 UIimage 将其保存到磁盘,它达到 240 KB。
根据图像大小,我希望它小于 50KB 左右。(失去质量是可以的)
可能吗 ?
谢谢,
拉古
请参阅Trevor Harmon 关于该主题的出色帖子。
240KB 大小听起来与未压缩 (320x420x3) 的原始 RGB 图像数据完全一样。iPhone没有PNG或JPEG导出器吗?互联网上说要使用 UIImageJPEGRepresentation 或 UIImagePNGRepresentation 和 NSData writeToFile。