NSData *pdata = UIImageJPEGRepresentation(pImage, 1);
pData = UIImageJPEGRepresentation(pImage, 1);
CGFloat pSize = [pData length]/(1024*1024);
if ( pSize <1) {
[pData writeToFile:TMP_IMG atomically:YES];
}else{
pData = UIImageJPEGRepresentation(pImage, 1/(pSize+0.5));
[pData writeToFile:TMP_IMG atomically:YES];
}
网友评论