uiimage - Encode Byte array to JPEG image in Objective-C -


I have a file of raw data, it has an image data, now I have raw data in Objective-C in JPEG image Must have to change. Step:

1) Read the file containing raw data in NSString. 2) Encrypt string for JPEG encoder 3) Create JPEG image

Can you please guide me how to get it?

Is there any library available in the iPhone OS to encode into JPEG?

How do you create a UIImage with JPEG data:

  UIImage * img = [UIImage imageWithData: [NSDATA DataWind's contentsofffile: A ?? |]] ;;   

And such that you have a UIImage :

  NSDTA * data = UIImageJPEG repetition (an image, compression quality) Make JPEG representation);   

one ?? | But after just writing it, I realized that maybe you want to create a JPEG image with raw image sample data? In that case, you have to create an CGImage with an image sample format and supply bitmap data using a provider, see CGImageCreate . (Hopefully someone can correct me or come up with a sample code.) Then you can easily create UIImage with CGImage and use the above code can do.

Comments