Don't override the isDecoded = YES for non-CGContext drawn CGImage

This commit is contained in:
DreamPiggy 2023-07-10 23:27:18 +08:00
parent 13f640b36d
commit 4b45cdde01
1 changed files with 0 additions and 2 deletions

View File

@ -347,7 +347,6 @@ static inline CGSize SDCalculateScaleDownPixelSize(NSUInteger limitBytes, CGSize
UIImage *firstFrameImage = [[UIImage alloc] initWithCGImage:imageRef scale:scale orientation:kCGImagePropertyOrientationUp];
#endif
firstFrameImage.sd_imageFormat = SDImageFormatWebP;
firstFrameImage.sd_isDecoded = YES; // We handle byte alignment and alloc bitmap buffer
CGImageRelease(imageRef);
WebPDemuxReleaseIterator(&iter);
WebPDemuxDelete(demuxer);
@ -1339,7 +1338,6 @@ static float GetFloatValueForKey(NSDictionary * _Nonnull dictionary, NSString *
image = [[UIImage alloc] initWithCGImage:imageRef scale:_scale orientation:kCGImagePropertyOrientationUp];
#endif
image.sd_imageFormat = SDImageFormatWebP;
image.sd_isDecoded = YES; // We handle byte alignment and alloc bitmap buffer
CGImageRelease(imageRef);
WebPDemuxReleaseIterator(&iter);