From 4b45cdde01356938f42d91808eabfca1b1c8dcc7 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Mon, 10 Jul 2023 23:27:18 +0800 Subject: [PATCH] Don't override the isDecoded = YES for non-CGContext drawn CGImage --- SDWebImageWebPCoder/Classes/SDImageWebPCoder.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m b/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m index 1f69604..09901c1 100644 --- a/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m +++ b/SDWebImageWebPCoder/Classes/SDImageWebPCoder.m @@ -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);