Skip to content

jacksondeane/JDGIFEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JDGIFEngine

An iOS class to generate animated GIFs from a video file.

JDGIFEngine *gifEngine = [JDGIFEngine new];
JDGIFEngineOperation *operation;

//GIF from video
operation = [gifEngine operationWithVideoURL:videoPath cropStartTime:0 cropEndTime:MAXFLOAT overlayImage:nil previewImage:^(UIImage *previewImage) {
    NSLog(@"previewImage: %@", previewImage);
} completion:^(NSURL *gifURL) {
    NSLog(@"gifURL: %@", gifURL);
}];

//GIF from still images
NSMutableArray *frames; //provide an array of UIImages
operation = [gifEngine operationWithFrames:frames frameDuration:.5 previewImage:^(UIImage *previewImage) {
    NSLog(@"previewImage: %@", previewImage);
} completion:^(NSURL *gifURL) {
    NSLog(@"gifURL: %@", gifURL);
}];

[gifEngine addOperationToQueue:operation];

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors