From 69cca49687edca75aac3816ad45911a202ae96f7 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 23 Jul 2024 15:24:18 +0800 Subject: [PATCH] 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 --- SDWebImage/Core/SDImageIOAnimatedCoder.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SDWebImage/Core/SDImageIOAnimatedCoder.m b/SDWebImage/Core/SDImageIOAnimatedCoder.m index cb05e395..d30da12f 100644 --- a/SDWebImage/Core/SDImageIOAnimatedCoder.m +++ b/SDWebImage/Core/SDImageIOAnimatedCoder.m @@ -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]) {