Latest 0.1.0
Homepage https://github.com/mattt/WebPImageSerialization
License MIT
Platforms ios 5.0, requires ARC
Authors

WebPImageSerialization encodes and decodes between UIImage
and WebP images,
following the API conventions of Foundation’s NSJSONSerialization class.

By default, UIImage initializers can’t decode animated images from GIF files.
This library uses swizzling to provide this functionality for you.
To opt out of this behavior,
set WEBP_NO_UIIMAGE_INITIALIZER_SWIZZLING in your build environment.
If you’re using CocoaPods,
you can add this build setting to your Podfile:

post_install do |r|
  r.pods_project.targets.each do |target|
    if target.name == 'WebPImageSerialization' then
      target.build_configurations.each do |config|
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||=
          ['$(inherited)', 'WEBP_NO_UIIMAGE_INITIALIZER_SWIZZLING=1']
      end
    end
  end
end

Usage

Decoding

UIImageView *imageView = ...;
imageView.image = [UIImage imageNamed:@"image.webp"];

Encoding

NSData *data = UIImageWebPRepresentation(imageView.image);

Contact

Mattt (@mattt)

License

WebPImageSerialization is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WebPImageSerialization",
    "version": "0.1.0",
    "license": "MIT",
    "summary": "Encodes and decodes between UIImage and WebP image data.",
    "homepage": "https://github.com/mattt/WebPImageSerialization",
    "social_media_url": "https://twitter.com/mattt",
    "authors": {
        "Mattt": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mattt/WebPImageSerialization.git",
        "tag": "0.1.0"
    },
    "source_files": [
        "WebPImageSerialization",
        "WebP.framework"
    ],
    "preserve_paths": [
        "WebPImageSerialization",
        "WebP.framework"
    ],
    "vendored_frameworks": "WebP.framework",
    "requires_arc": true,
    "ios": {
        "frameworks": "CoreGraphics"
    },
    "platforms": {
        "ios": "5.0"
    }
}

Pin It on Pinterest

Share This