Encode Byte array to JPEG image in Objective-C
问题 I have a file of raw data , its a image data. Now i need to convert the Raw data to JPEG image in Objective-C. STEPS: 1) Read the file containing the raw data into NSString. 2) Encode the string to JPEG encoder 3) Create an JPEG image Can you please guide me how to achieve this? Is there any library available in iPhone OS to encode into JPEG. 回答1: This is how you create a UIImage from JPEG data: UIImage *img = [UIImage imageWithData:[NSData dataWithContentsOfFile:…]]; And this is how you