Manikandaraj Srinivasan
Manikandaraj Srinivasan

Reputation: 3647

IOS save gif image from UIImagePickerController selected image

I am creating an app in which I need to copy image from IOS Photo library to the app's Document directory and then upload the file to the server. I'm using the UIImagePickerController to select the image from the Photo library and save it in the app folder. It works good for the "jpeg" and "png" images using UIImageJPEGRepresentation and UIImagePNGRepresentation.

I don't see any option to copy and save the "gif" images in IOS. Is it possible to save the animated gif images. Please throw some light on how to process and save the original images (bmp, jpg, gif, png, tiff, etc.,).

Thanks in advance.

Upvotes: 4

Views: 3404

Answers (1)

Dirk-Willem van Gulik
Dirk-Willem van Gulik

Reputation: 7706

While you can load them (though you need to split them up for animations; Add animated Gif image in Iphone UIImageView - note the convert command near the bottom) one cannot save them.

To save them you'll need to use a third party library.

See this question, How to save a GIF on the iPhone?, and this http://jitsik.com/wordpress/?p=208 library for a solution.

Upvotes: 2

Related Questions