Skip to content

HarrisonJackson/HJImagesToGIF

Repository files navigation

HJImagesToGIF

Convert image array to animated GIF

Save to path

[HJImagesToGIF saveGIFFromImages:images toPath:path WithCallbackBlock:nil];

Save to photo album

[HJImagesToGIF saveGIFToPhotoAlbumFromImages:images WithCallbackBlock:nil];

Example Usage

    NSString *tempPath = [NSHomeDirectory() stringByAppendingPathComponent:
                          [NSString stringWithFormat:@"puppy.gif"]];
    
    NSArray * images = [NSArray arrayWithObjects:[UIImage imageNamed:@"frame1.png"],
                        [UIImage imageNamed:@"frame2.png"],
                        [UIImage imageNamed:@"frame3.png"],
                        [UIImage imageNamed:@"frame4.png"],
                        [UIImage imageNamed:@"frame5.png"],
                        [UIImage imageNamed:@"frame6.png"], nil];
    
    [HJImagesToGIF saveGIFFromImages:images toPath:tempPath WithCallbackBlock:^{
        NSLog(@"Saved to file!");
    }];
    
    [HJImagesToGIF saveGIFToPhotoAlbumFromImages:images WithCallbackBlock:^{
        NSLog(@"Saved to album!");
    }];

alt text alt text alt text alt text alt text alt text alt text

Copyright 2013 Harrison Jackson http://harrisonjackson.us

Feel free to use however you want - if you make any improvements submit a pull request!

About

Convert image array to animated GIF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published