Change from instance method to class method

This commit is contained in:
DreamPiggy 2022-11-11 00:07:32 +08:00
parent f4706453d6
commit 30f165abd5
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ static NSString * kSDCGImageDestinationRequestedFileSize = @"kCGImageDestination
} }
#pragma mark - Bitmap PDF representation #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); NSParameterAssert(data);
UIImage *image; UIImage *image;
@ -168,7 +168,7 @@ static NSString * kSDCGImageDestinationRequestedFileSize = @"kCGImageDestination
} }
} }
#endif #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; image.sd_imageFormat = SDImageFormatPDF;
return image; return image;
} }