Skip to content

Instantly share code, notes, and snippets.

View clemesha's full-sized avatar

Alex Clemesha clemesha

View GitHub Profile
@akisute
akisute / gist:1141953
Created August 12, 2011 12:41
Create an animated gif file from images in iOS
#import <UIKit/UIKit.h>
#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/MobileCoreServices.h>
- (void)exportAnimatedGif
{
UIImage *shacho = [UIImage imageNamed:@"shacho.png"];
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"];
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"];
def getPage(url):
d = Deferred()
# here it would set up an http client programmed to call
# d.callback(body) when page is fully received...
return d
def handleBody(body):
print body