2013-05-21 4 views
0

Когда я сохраняю изображение в альбоме, оно не удалось.как решить «ImageIO: JPEG приложение перенесено слишком мало строк сканирования»

error info: PEG Application transferred too few scanlines 

Кто-нибудь когда-либо встречал это? Благодарю.

// make data provider with data. 
Float32 picSize = texture->image_size.width * texture->image_size.height * texture->bytesPerPixel; 
NSLog(@"pic size:%f", picSize); 
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, texture->data, texture->image_size.width * texture->image_size.height * texture->bytesPerPixel, NULL); 

// prep the ingredients 
int bitsPerComponent = 8; 
int bitsPerPixel = 32; 
int bytesPerRow = 4 * 320; 
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); 
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; 
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; 

// make the cgimage 
CGImageRef imageRef = CGImageCreate(320, 480, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent); 

// then make the uiimage from that 
UIImage *myImage = [UIImage imageWithCGImage:imageRef]; 
UIImageWriteToSavedPhotosAlbum(myImage, self, nil, nil); 

ответ

0

эй смотри похожие темы. Вы видели это? . Этот поток подробно описывает одну и ту же проблему. go through this link

+0

Я видел это раньше. Разница в том, что у меня нет пути, только у меня есть точка изображения. – alexqinbj

 Смежные вопросы

  • Нет связанных вопросов^_^