【发布时间】:2012-11-08 05:59:55
【问题描述】:
我通过传递两个参数使用以下方法创建图像,一个是UIImage对象是imagdata,NSString对象是storeImage
JPG:[UIImageJPEGRepresentation(imageData, 1.0) writeToFile:storeImage atomically:YES];
要么
PNG:[UIImagePNGRepresentation(imageData) writeToFile:storeImage atomically:YES];
我的问题是,在我使用上述方法后,原始图像大小为 2.1 MB,模拟器中的图像大小为 4.2 MB。
我不想使用任何压缩方法,也不想损失任何图像质量。我想复制给定路径中的图像。实际大小。
【问题讨论】:
-
或许
-[NSFileManager copyItemAtPath:toPath:error:];更合适? -
如果您不想损失质量,请不要使用 JPEG。
标签: iphone ios ios4 ios-simulator