diff --git a/iOS-WebP.podspec b/iOS-WebP.podspec index 75e909b..ff5527b 100644 --- a/iOS-WebP.podspec +++ b/iOS-WebP.podspec @@ -9,5 +9,5 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/seanooi/iOS-WebP.git', :tag => '0.5' } s.source_files = 'iOS-WebP/*.{h,m}' s.requires_arc = true - s.dependency 'libwebp', '~> 0.5.0' + s.dependency 'libwebp', '>= 0.5.0' end diff --git a/iOS-WebP/UIImage+WebP.m b/iOS-WebP/UIImage+WebP.m index b49fa5d..57bd7a2 100644 --- a/iOS-WebP/UIImage+WebP.m +++ b/iOS-WebP/UIImage+WebP.m @@ -156,7 +156,7 @@ + (UIImage *)imageWithWebPData:(NSData *)imgData error:(NSError **)error // Construct UIImage from the decoded RGBA value array uint8_t *data = WebPDecodeRGBA([imgData bytes], [imgData length], &width, &height); - CGDataProviderRef provider = CGDataProviderCreateWithData(config, data, config->options.scaled_width * config->options.scaled_height * 4, free_image_data); + CGDataProviderRef provider = CGDataProviderCreateWithData(config, data, width * height * 4, free_image_data); CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault |kCGImageAlphaLast;