Skip to content

Commit

Permalink
import README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Mayoff committed Jan 28, 2012
1 parent 6961534 commit fb9325f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This project defines a category `animatedGIF` on `UIImage`. The category defines two methods. This method creates an animated `UIImage` using the frames of the GIF in `data`:

+[UIImage animatedImageWithAnimatedGIFData:(NSData *)data duration:(NSTimeInterval)duration]

This method creates an animated `UIImage` using the frames of the GIF loaded from `url`:

+[UIImage animatedImageWithAnimatedGIFURL:(NSURL *)url duration:(NSTimeInterval)duration]

To use this category in your own project, copy `UIImage+animatedGIF.h` and `UIImage+animatedGIF.m` to your project, and add `ImageIO.framework` to the "Link Binary With Libraries" build phase of your target.

The implementation of this category is quite simple. It uses the [Image I/O Framework](http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/ImageIOGuide/imageio_intro/ikpg_intro.html) to do all of the real work.

The contents of this repository are dedicated to the public domain, in accordance with the [CC0 1.0 Universal Public Domain Dedication](http://creativecommons.org/publicdomain/zero/1.0/), which is reproduced in the file `COPYRIGHT`.

Author: Rob Mayoff
2012-01-27
8 changes: 7 additions & 1 deletion uiimage-from-animated-gif.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
31C640FE14D3AFB1007FB1F0 /* UIImage+animatedGIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 31C640FD14D3AFB1007FB1F0 /* UIImage+animatedGIF.m */; };
31C6410414D3B277007FB1F0 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 31C6410314D3B277007FB1F0 /* ImageIO.framework */; };
31C6410714D3B731007FB1F0 /* test.gif in Resources */ = {isa = PBXBuildFile; fileRef = 31C6410614D3B731007FB1F0 /* test.gif */; };
31C6410914D3B790007FB1F0 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 31C6410814D3B790007FB1F0 /* README.md */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -38,6 +39,8 @@
31C640FD14D3AFB1007FB1F0 /* UIImage+animatedGIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+animatedGIF.m"; sourceTree = "<group>"; };
31C6410314D3B277007FB1F0 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
31C6410614D3B731007FB1F0 /* test.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = test.gif; sourceTree = "<group>"; };
31C6410814D3B790007FB1F0 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
31C6410A14D3B9D1007FB1F0 /* COPYRIGHT */ = {isa = PBXFileReference; lastKnownFileType = text; path = COPYRIGHT; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -58,7 +61,8 @@
31C640D014D3AF2B007FB1F0 = {
isa = PBXGroup;
children = (
31C6410314D3B277007FB1F0 /* ImageIO.framework */,
31C6410814D3B790007FB1F0 /* README.md */,
31C6410A14D3B9D1007FB1F0 /* COPYRIGHT */,
31C640E514D3AF2B007FB1F0 /* uiimage-from-animated-gif */,
31C640DE14D3AF2B007FB1F0 /* Frameworks */,
31C640DC14D3AF2B007FB1F0 /* Products */,
Expand All @@ -76,6 +80,7 @@
31C640DE14D3AF2B007FB1F0 /* Frameworks */ = {
isa = PBXGroup;
children = (
31C6410314D3B277007FB1F0 /* ImageIO.framework */,
31C640DF14D3AF2B007FB1F0 /* UIKit.framework */,
31C640E114D3AF2B007FB1F0 /* Foundation.framework */,
31C640E314D3AF2B007FB1F0 /* CoreGraphics.framework */,
Expand Down Expand Up @@ -163,6 +168,7 @@
31C640EA14D3AF2B007FB1F0 /* InfoPlist.strings in Resources */,
31C640F614D3AF2B007FB1F0 /* ViewController.xib in Resources */,
31C6410714D3B731007FB1F0 /* test.gif in Resources */,
31C6410914D3B790007FB1F0 /* README.md in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down

0 comments on commit fb9325f

Please sign in to comment.