0
は、私がここでエラー
<Error>: Unsupported pixel description - 4 components, 8 bits-per-component, 32 bits-per-pixel
<Error>: CGBitmapContextCreateWithDictionary: failed to create delegate.
<Error>: CGImageDestinationAddImage image could not be converted to destination format.
<Error>: CGImageDestinationFinalize image destination does not have enough images
UIImageJPEGRepresentation(image, 0.5f);
は、私がダウンロードしたデータを圧縮コードスニペットで使用して、いくつかのJPEGデータを圧縮しようとすると、次のエラーを取得使用してJPEGデータを圧縮する...
ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:object.largeimage]];
[request startSynchronous];
NSData *imageData = [request responseData];
UIImage *image = [[UIImage alloc] initWithData:imageData];
NSData *compressedImageData = UIImageJPEGRepresentation(image, 0.5f);
//If the data was compressed properly...
if(compressedImageData) [compressedImageData writeToFile:filePath atomically:YES];
//If it wasn't...
else [imageData writeToFile:filePath atomically:YES];
[image release];
if(request.responseStatusCode == 200)
object.fullImageFilename = filePath;
[request release];
[リクエストのリリース];
任意の助けを事前に感謝:)
それでも
この回避策は私に多くを保存時間の。共有してくれてありがとう。私がデータベースに保存しなければならない20,000枚のJPEG写真のバッチでは、このエラーは約250件発生しました。私たちはまだ理由を知らない。 – Bjinse