Skip to content

Commit 9741e33

Browse files
authored
Fix sd_imageFormat returns nil
1 parent 0b10fcb commit 9741e33

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SDWebImage/Core/SDAnimatedImage.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ - (instancetype)initWithData:(NSData *)data scale:(CGFloat)scale options:(SDImag
182182
#else
183183
self = [super initWithCGImage:image.CGImage scale:MAX(scale, 1) orientation:image.imageOrientation];
184184
#endif
185+
// Defines the associated object that holds the format for static images
186+
super.sd_imageFormat = format;
185187
return self;
186188
}
187189
}
@@ -375,7 +377,8 @@ - (SDImageFormat)sd_imageFormat {
375377
}
376378

377379
- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
378-
return;
380+
// Sets the image format for static images
381+
super.sd_imageFormat = sd_imageFormat;
379382
}
380383

381384
- (BOOL)sd_isVector {

0 commit comments

Comments
 (0)