How to programmatically convert PNG image to GIF in iPhone

How to select several photos from the library and convert them to a gif?

+1
objective-c iphone png gif
source share
3 answers

Check out these links.

According to Apple

Xcode automatically optimizes your PNG images using the pngcrush utility that comes with the SDK. (You will find the program in the iPhoneOS platform at / Developer. Run it from the command line using -iphoneswitch to convert standard PNG files to iPhone format.) For this reason, use PNG images in iPhone applications, where possible as your preferred image format.

Better prefer to use PNG for your image requirements.

To select an image:

http://iphone.zcentric.com/2008/08/28/using-a-uiimagepickercontroller/

http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html#//apple_ref/doc/uid/TP40010406

For conversion: http://blog.objectgraph.com/index.php/2010/04/05/download-an-image-and-save-it-as-png-or-jpeg-in-iphone-sdk/

Hope this helps

+1
source share

There's ImageMagick for iPhone.Check Use ImageMagick to create animated GIFs on iPhone . Or do a search for โ€œImageMagick for iphoneโ€ on Google

+1
source share

You can create GIFs using the ImageIO framework, which is part of the iOS SDK. You do not need ImageMagick or any other third-party library.

See this answer for code that uses ImageIO to create animated GIFs. If you don't want an animated GIF, just add a single image instead of a bunch of images.

Regarding the selection of images from the library, there are already many questions about stackoverflow about this. Just find [iphone] pick image from library .

0
source share

All Articles