1

how can I save a GIF on the iPhone? The SDK includes only UIImageJPEGRepresentation and UIImagePNGRepresentation but nothing for GIFs or other image formats, is there a way to convert a UIImage to a GIF and save it?

GM

GM.
  • 287
  • 1
  • 6
  • 16

2 Answers2

3

This is a library I wrote for encoding GIF images on the iPhone, if anyone reading this is interested:

http://jitsik.com/wordpress/?p=208

  • nice library! is there an example snippet for a single image GIF (non-animated)? I just want to convert a photo to a GIF color space and display it on the phone – mga Mar 14 '12 at 03:18
1

You can't without a third party GIF library. The question is why do you need it to be GIF? PNG provides all that you might need and it is well supported. If you are trying to do animation, look at UIImageView's -animationImages property.

Matt Long
  • 24,438
  • 4
  • 73
  • 99