2

I'm creating an animated gif from a video using Regift. I'm writing my application in objective C, but I am able to successfully create the gif using a bridge and helper. The result of my helper is a file url.

NSURL *animGifURL = [RegiftHelper createGIFFromURL:furl withFrameCount:8 delayTimer:2 loopCounter:0];

From the file url, I create a UIImage and save it to the library.

UIImage *animGif = [UIImage imageWithData:[NSData dataWithContentsOfURL:animGifURL]];

UIImageWriteToSavedPhotosAlbum(animGif,
                               self,
                               @selector(thisImage:hasBeenSavedInPhotoAlbumWithError:usingContextInfo:),
                               NULL); 

Somewhere along the way ( most likely when I create the UIImage ) the gif looses it's animation. So how do I save it so that it retains the animation

I should also mention I'n developing for IOS 9 ...

user379468
  • 3,989
  • 10
  • 50
  • 68
  • @matt my question is different, the question you sited is about creating the gif, I am already creating the gif using the Regift project ... what I'm having trouble doing is saving the gif to photo library, because when I save it using UIImageWriteToSavedPhotosAlbum it does not retain the animation – user379468 Mar 21 '16 at 17:23
  • Okay, but that question leads you to this: http://stackoverflow.com/questions/15079262/how-do-i-save-a-gif-to-my-photo-album Basically my point is, nothing new here, folks, move along, move along – matt Mar 21 '16 at 18:01
  • @matt also a different question, I'm asking about the photos framework specifically, ALAssetsLibrary is deprecated in iOS 9 ... – user379468 Mar 21 '16 at 18:28
  • ALAssetsLibrary is merely an API front end, a programming tool. What's important is the underlying facts. A UIImage is a UIImage. The photo library is the photo library. – matt Mar 21 '16 at 18:37

0 Answers0