1
투명한 부분은 있지만 문서 폴더에 저장하는 동안 투명한 부분이 흰색으로 변경되었습니다. 다음은 아이폰 앱의 문서 폴더에있는 투명한 UIImage
는NSData *dataPhoto = UIImageJPEGRepresentation(imageBigPhoto, 1.0);
//NSData *dataPhoto = UIImagePNGRepresentation(imageBigPhoto);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *fullPathWithFoldername=[documentsDirectory stringByAppendingFormat:@"/%@",[[NSUserDefaults standardUserDefaults]valueForKey:@"PhotoFolderName"]];
//NSLog(@"%@",fullPathWithFoldername);
NSString *fullPath = [fullPathWithFoldername stringByAppendingPathComponent:name];
[dataPhoto writeToFile:fullPath atomically:YES];
PNG 형식에서 JPEG 형식으로 전환 한 것을 확인했습니다. PNG와 동일한 문제가 있었습니까? – Ariel
JPEG는 투명도를 적용하지 않습니다. – ssteinberg