Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Fix for iOS11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
awakia committed Nov 9, 2017
1 parent 9234553 commit 89aa62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iOS-WebP/UIImage+WebP.m
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,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, (config->options.scaled_width || width) * (config->options.scaled_height || height) * 4, free_image_data);

CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault |kCGImageAlphaLast;
Expand Down

0 comments on commit 89aa62f

Please sign in to comment.