Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 11.2 Beta #46

Open
nguyenphan opened this issue Nov 7, 2017 · 2 comments
Open

iOS 11.2 Beta #46

nguyenphan opened this issue Nov 7, 2017 · 2 comments

Comments

@nguyenphan
Copy link

nguyenphan commented Nov 7, 2017

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
Copy link
Author

nguyenphan commented Nov 8, 2017

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

@cleanbit
Copy link

cleanbit commented Nov 8, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants