Skip to content

Commit 69cca49

Browse files
committed
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 SDWebImage#3727
1 parent ce406a2 commit 69cca49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SDWebImage/Core/SDImageIOAnimatedCoder.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,9 @@ - (NSData *)encodedDataWithFrames:(NSArray<SDImageFrame *> *)frames loopCount:(N
847847
#else
848848
CGImagePropertyOrientation exifOrientation = kCGImagePropertyOrientationUp;
849849
#endif
850-
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
850+
if (exifOrientation != kCGImagePropertyOrientationUp) {
851+
properties[(__bridge NSString *)kCGImagePropertyOrientation] = @(exifOrientation);
852+
}
851853
// Encoding Options
852854
double compressionQuality = 1;
853855
if (options[SDImageCoderEncodeCompressionQuality]) {

0 commit comments

Comments
 (0)