File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
SDWebImageYYPlugin/Classes/YYCache/YYCacheBridge Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 11PODS:
22 - Expecta (1.0.6)
3- - SDWebImage/Core (5.0.0 )
3+ - SDWebImage/Core (5.0.2 )
44 - SDWebImageYYPlugin (0.2.0):
55 - SDWebImage/Core (~> 5.0)
66 - SDWebImageYYPlugin/YYCache (= 0.2.0)
@@ -34,7 +34,7 @@ EXTERNAL SOURCES:
3434
3535SPEC CHECKSUMS:
3636 Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
37- SDWebImage: 5de80a0302de9e377e62f47d2fa1304efff0e55f
37+ SDWebImage: 6764b5fa0f73c203728052955dbefa2bf1f33282
3838 SDWebImageYYPlugin: 3398b1f1016cd30d8fdb857226c254a0da8b1a11
3939 YYCache: 8105b6638f5e849296c71f331ff83891a4942952
4040 YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
Original file line number Diff line number Diff line change @@ -45,6 +45,15 @@ @implementation YYCache (SDAdditions)
4545
4646 // First check the in-memory cache...
4747 UIImage *image = [self .memoryCache objectForKey: key];
48+
49+ if ((options & SDImageCacheDecodeFirstFrameOnly) && image.sd_isAnimated ) {
50+ #if SD_MAC
51+ image = [[NSImage alloc ] initWithCGImage: image.CGImage scale: image.scale orientation: kCGImagePropertyOrientationUp ];
52+ #else
53+ image = [[UIImage alloc ] initWithCGImage: image.CGImage scale: image.scale orientation: image.imageOrientation];
54+ #endif
55+ }
56+
4857 BOOL shouldQueryMemoryOnly = (image && !(options & SDImageCacheQueryMemoryData));
4958 if (shouldQueryMemoryOnly) {
5059 if (doneBlock) {
You can’t perform that action at this time.
0 commit comments