Fix `sd_imageFormat` returns nil

This commit is contained in:
Łukasz Kosmaty 2024-10-18 23:27:03 +02:00 committed by GitHub
parent 0b10fcb544
commit 9741e3339d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -182,6 +182,8 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
#else #else
self = [super initWithCGImage:image.CGImage scale:MAX(scale, 1) orientation:image.imageOrientation]; self = [super initWithCGImage:image.CGImage scale:MAX(scale, 1) orientation:image.imageOrientation];
#endif #endif
// Defines the associated object that holds the format for static images
super.sd_imageFormat = format;
return self; return self;
} }
} }
@ -375,7 +377,8 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
} }
- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat { - (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
return; // Sets the image format for static images
super.sd_imageFormat = sd_imageFormat;
} }
- (BOOL)sd_isVector { - (BOOL)sd_isVector {