Fix the test case on iOS 18.0 simulator

This commit is contained in:
DreamPiggy 2024-10-08 17:39:50 +08:00
parent a261180b95
commit c8f74d2de0
1 changed files with 6 additions and 1 deletions

View File

@ -563,7 +563,12 @@
UIImage *systemImage = [[UIImage alloc] initWithData:data];
#if SD_UIKIT
orientation = systemImage.imageOrientation;
expect(orientation).equal(UIImageOrientationDown);
if (@available(iOS 18.0, tvOS 18.0, watchOS 11.0, *)) {
// Apple fix/hack this kind of JFIF on iOS 18
expect(orientation).equal(UIImageOrientationUp);
} else {
expect(orientation).equal(UIImageOrientationDown);
}
#endif
// Check bitmap color equal, between our usage of ImageIO decoder and Apple system API behavior