【发布时间】:2010-05-15 14:19:13
【问题描述】:
我正在使用 UIImageWriteToSavedPhotosAlbum 将图像保存在相机胶卷中,但即使图片正确,也总是得到黑色缩略图。
你有解决这个问题的指针吗?
提前感谢您的帮助。
问候,
【问题讨论】:
我正在使用 UIImageWriteToSavedPhotosAlbum 将图像保存在相机胶卷中,但即使图片正确,也总是得到黑色缩略图。
你有解决这个问题的指针吗?
提前感谢您的帮助。
问候,
【问题讨论】:
我遇到了同样的问题。在 UIGraphicsImageContext 中绘制图像解决了这个问题:
CGRect rect = CGRectMake(0,0,100,100);
UIImage *image = ((put here your image));
UIGraphicsBeginImageContext(rect.size);
[image drawInRect:rect];
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(
result, self, @selector(image:didFinishSavingWithError:contextInfo:),nil);
【讨论】: