From 9078f316f79e9bb9e3da039aa2ef6cc12798882d Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sun, 8 Oct 2023 15:34:25 +0800 Subject: [PATCH] Update the convenient API for UIImage (not SDAnimatedImage) to grab the current image format when no encode format provided This match two classes behavior --- SDWebImage/Core/UIImage+MultiFormat.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SDWebImage/Core/UIImage+MultiFormat.m b/SDWebImage/Core/UIImage+MultiFormat.m index fc87f887..a569477c 100644 --- a/SDWebImage/Core/UIImage+MultiFormat.m +++ b/SDWebImage/Core/UIImage+MultiFormat.m @@ -9,6 +9,7 @@ #import "UIImage+MultiFormat.h" #import "SDImageCodersManager.h" #import "SDAnimatedImageRep.h" +#import "UIImage+Metadata.h" @implementation UIImage (MultiFormat) @@ -41,7 +42,7 @@ } } #endif - return [self sd_imageDataAsFormat:SDImageFormatUndefined]; + return [self sd_imageDataAsFormat:self.sd_imageFormat]; } - (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat {