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
bmp image With imageFromDiskCacheForKey can't load in iOS15.2 and later #3330
Comments
|
This is Demo for test
|
I test with you demo. |
Are you use Simulator or real machine? |
|
iPhone 12 Device. |
@kinarobin This video demo was shot with an iPad Pro |
|
I guess this may be Apple ImageIO bug. We didn't do anything special to BMP format. Which should be handled by ImageIO codec. Any intersting logs or open radar related ? |
|
Seems this API cause blank image: -> -> The CGImageRef returned from ImageIO is: |
|
Seems Apple's bug. CGContext's draw call, should convert the RGBX8888 to our BGRX8888, which is documented behavior. However it fails on iOS 15. A quick hack is to check the fomat and use the input CGImage's bitmap info to create CGContext. PR will available later. And this sample BMP image will added to unit test. |
|
One small question: What's the meaning of
Seems after the reverse engineering, I found the |
|
Released v5.12.4 |
|
One tip: For new user who don't want that See: SDWebImageManager.sharedManager.optionsProcessor = [SDWebImageOptionsProcessor optionsProcessorWithBlock:^SDWebImageOptionsResult * _Nullable(NSURL * _Nullable url, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
// Disable Force Decoding in global, may reduce the frame rate
options |= SDWebImageAvoidDecodeImage;
return [[SDWebImageOptionsResult alloc] initWithOptions:options context:context];
}]; |
|
Can anyone limit the effect iOS version for this bug ? I have no extra iPhones, but tested with iPhone 15.2 simulator I found the reproduce way: If CGContext: BGRX8888, However, if CGContext is BGRA8888(alpha channel), everything works. |
Check result:
I assume this is a iOS 15+ only bug. Reproduce Demo: https://github.com/dreampiggy/CGContextDrawImageBug |


test bmp url:
https://raw.githubusercontent.com/JzwOnly/unMec/main/001.bmpSDWebImage Version: 5.12.3
iPhone in iOS 14.8 is ok
when I update to iOS 15.3.1 this bmp url can't show but disk memory bmp image no error
The text was updated successfully, but these errors were encountered: