NSData *imageData = UIImageJPEGRepresentation(self.imageView.image,0.5);
再进行base64编码成字符串 NSString*text = [imageData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]; NSString * encodingString = [text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];