Skip to content

Commit 780aa6d

Browse files
authored
Merge pull request SDWebImage#3760 from lukmccall/patch-1
Fix `sd_imageFormat` sometimes returns `undefined`
2 parents 0b10fcb + 0b3a6b2 commit 780aa6d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

SDWebImage/Core/SDAnimatedImage.m

Lines changed: 2 additions & 4 deletions
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
}
@@ -374,10 +376,6 @@ - (SDImageFormat)sd_imageFormat {
374376
}
375377
}
376378

377-
- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
378-
return;
379-
}
380-
381379
- (BOOL)sd_isVector {
382380
return NO;
383381
}

0 commit comments

Comments
 (0)