From 30f165abd5444cf83a8e30f239139c820dd926e6 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 11 Nov 2022 00:07:32 +0800 Subject: [PATCH] Change from instance method to class method --- SDWebImage/Core/SDImageIOCoder.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/Core/SDImageIOCoder.m b/SDWebImage/Core/SDImageIOCoder.m index 3d22404f..72fc4c6f 100644 --- a/SDWebImage/Core/SDImageIOCoder.m +++ b/SDWebImage/Core/SDImageIOCoder.m @@ -57,7 +57,7 @@ static NSString * kSDCGImageDestinationRequestedFileSize = @"kCGImageDestination } #pragma mark - Bitmap PDF representation -- (UIImage *)createBitmapPDFWithData:(nonnull NSData *)data pageNumber:(NSUInteger)pageNumber targetSize:(CGSize)targetSize preserveAspectRatio:(BOOL)preserveAspectRatio { ++ (UIImage *)createBitmapPDFWithData:(nonnull NSData *)data pageNumber:(NSUInteger)pageNumber targetSize:(CGSize)targetSize preserveAspectRatio:(BOOL)preserveAspectRatio { NSParameterAssert(data); UIImage *image; @@ -168,7 +168,7 @@ static NSString * kSDCGImageDestinationRequestedFileSize = @"kCGImageDestination } } #endif - image = [self createBitmapPDFWithData:data pageNumber:pageNumber targetSize:thumbnailSize preserveAspectRatio:preserveAspectRatio]; + image = [self.class createBitmapPDFWithData:data pageNumber:pageNumber targetSize:thumbnailSize preserveAspectRatio:preserveAspectRatio]; image.sd_imageFormat = SDImageFormatPDF; return image; }