Plugins/Image Uploading Plugin/AIGenericMultipartImageUploader.m
branchadium-1.5.11
changeset 6016 325e2ab3406f
parent 3678 4dbda7e6999b
equal deleted inserted replaced
6014:fcb71cb71a3d 6016:325e2ab3406f
   126 {
   126 {
   127 	NSMutableData *body = [NSMutableData data];
   127 	NSMutableData *body = [NSMutableData data];
   128 	
   128 	
   129 	NSBitmapImageFileType bestType;
   129 	NSBitmapImageFileType bestType;
   130 	
   130 	
   131 	NSData *pngRepresentation = [[image largestBitmapImageRep] representationUsingType:NSPNGFileType properties:nil];
   131     NSData *pngRepresentation = [[image largestBitmapImageRep] representationUsingType:NSPNGFileType properties:@{}];
   132 	NSData *jpgRepresentation = [[image largestBitmapImageRep] representationUsingType:NSJPEGFileType properties:nil];
   132 	NSData *jpgRepresentation = [[image largestBitmapImageRep] representationUsingType:NSJPEGFileType properties:@{}];
   133 	NSData *imageRepresentation;
   133 	NSData *imageRepresentation;
   134 	
   134 	
   135 	if (pngRepresentation.length > jpgRepresentation.length) {
   135 	if (pngRepresentation.length > jpgRepresentation.length) {
   136 		bestType = NSJPEGFileType;
   136 		bestType = NSJPEGFileType;
   137 		imageRepresentation = jpgRepresentation;
   137 		imageRepresentation = jpgRepresentation;