From 9741e3339d3ffc671dc2215e2c30a146714c2697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Kosmaty?= Date: Fri, 18 Oct 2024 23:27:03 +0200 Subject: [PATCH 1/2] Fix `sd_imageFormat` returns nil --- SDWebImage/Core/SDAnimatedImage.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SDWebImage/Core/SDAnimatedImage.m b/SDWebImage/Core/SDAnimatedImage.m index 56c63e1c..fee2ac7c 100644 --- a/SDWebImage/Core/SDAnimatedImage.m +++ b/SDWebImage/Core/SDAnimatedImage.m @@ -182,6 +182,8 @@ static CGFloat SDImageScaleFromPath(NSString *string) { #else self = [super initWithCGImage:image.CGImage scale:MAX(scale, 1) orientation:image.imageOrientation]; #endif + // Defines the associated object that holds the format for static images + super.sd_imageFormat = format; return self; } } @@ -375,7 +377,8 @@ static CGFloat SDImageScaleFromPath(NSString *string) { } - (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat { - return; + // Sets the image format for static images + super.sd_imageFormat = sd_imageFormat; } - (BOOL)sd_isVector { From 0b3a6b20ae067e4778e991cedf9b179e5e7848e9 Mon Sep 17 00:00:00 2001 From: lukmccall Date: Mon, 21 Oct 2024 11:26:44 +0200 Subject: [PATCH 2/2] Remove unneeded override --- SDWebImage/Core/SDAnimatedImage.m | 5 ----- 1 file changed, 5 deletions(-) diff --git a/SDWebImage/Core/SDAnimatedImage.m b/SDWebImage/Core/SDAnimatedImage.m index fee2ac7c..14384e72 100644 --- a/SDWebImage/Core/SDAnimatedImage.m +++ b/SDWebImage/Core/SDAnimatedImage.m @@ -376,11 +376,6 @@ static CGFloat SDImageScaleFromPath(NSString *string) { } } -- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat { - // Sets the image format for static images - super.sd_imageFormat = sd_imageFormat; -} - - (BOOL)sd_isVector { return NO; }