Do a test again by only override the `kCGImagePropertyOrientation` when the orientation is not UP

This may remove the strange warning log from CoreMedia system framework, see #3727
This commit is contained in:
DreamPiggy 2024-07-23 15:24:18 +08:00
parent ce406a2b2d
commit 69cca49687
1 changed files with 3 additions and 1 deletions

View File

@ -847,7 +847,9 @@ static BOOL SDImageIOPNGPluginBuggyNeedWorkaround(void) {
#else
CGImagePropertyOrientation exifOrientation = kCGImagePropertyOrientationUp;
#endif
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
if (exifOrientation != kCGImagePropertyOrientationUp) {
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
}
// Encoding Options
double compressionQuality = 1;
if (options[SDImageCoderEncodeCompressionQuality]) {