iOS-WebP icon indicating copy to clipboard operation
iOS-WebP copied to clipboard

iOS 11.2 Beta

Open nguyenphan opened this issue 7 years ago • 2 comments

Is it just me or it does not work anymore on iOS 11.2 Beta? The imageRef in: CGImageRef imageRef = CGImageCreate(width, height, 8, 32, 4 * width, colorSpaceRef, bitmapInfo, provider, NULL, YES, renderingIntent); always return nil. I think this issue worth checking since it can potentially break everyone code when Apple officially release 11.2... screen shot 2017-11-07 at 9 10 02 pm

nguyenphan avatar Nov 07 '17 12:11 nguyenphan

Instead of this CGDataProviderRef provider = CGDataProviderCreateWithData(config, data, config->options.scaled_width * config->options.scaled_height * 4, free_image_data); it should be like this CGDataProviderRef provider = CGDataProviderCreateWithData(config, data, width * height * 4, free_image_data); Since you did not update the dimension for config, both scaled_* are 0. Apparently, someone on Apple Dev Team decided to verify the size of data and the pass-in size, so shit happened... #47

nguyenphan avatar Nov 08 '17 07:11 nguyenphan

I've confirmed with Apple, that this is indeed the case. Now they consider this behaviour as correct, when the size passed to CGDataProviderCreateWithData is 0.

cleanbit avatar Nov 08 '17 08:11 cleanbit