这种方法效率低下
NSData *data = UIImagePNGRepresentation(image);
NSMutableString *picStr = [NSMutableString stringWithString:@"["]; Byte *dataByte = (Byte *)[data bytes]; int length = [data length]; //字节流转nsstring; for(int i = 0;i < length;i++){ [picStr appendFormat:@"%d,",(int8_t)dataByte[i]]; }