有一些三方多图 返回的图片 格式
NSArray<UIImage *> *photos
而我们自己图片上传服务器是要转换一下 转成
NSArray< NSData *> *photos
NSMutableArray *dataArry = [NSMutableArray array];
for (int i = 0; i < imgArray.count; i++) {
UIImage * image =imgArray[i];
UIGraphicsBeginImageContext(image.size);
[image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *mydata=UIImageJPEGRepresentation(newImage, 1);
[dataArry addObject:mydata];
}
NSArray *picarry = [[NSArray alloc]initWithArray:dataArry];