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 1
1
PODS:
2
2
- Expecta (1.0.6)
3
- - SDWebImage/Core (5.0.0 )
3
+ - SDWebImage/Core (5.0.2 )
4
4
- SDWebImageYYPlugin (0.2.0):
5
5
- SDWebImage/Core (~> 5.0)
6
6
- SDWebImageYYPlugin/YYCache (= 0.2.0)
@@ -34,7 +34,7 @@ EXTERNAL SOURCES:
34
34
35
35
SPEC CHECKSUMS:
36
36
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
37
- SDWebImage: 5de80a0302de9e377e62f47d2fa1304efff0e55f
37
+ SDWebImage: 6764b5fa0f73c203728052955dbefa2bf1f33282
38
38
SDWebImageYYPlugin: 3398b1f1016cd30d8fdb857226c254a0da8b1a11
39
39
YYCache: 8105b6638f5e849296c71f331ff83891a4942952
40
40
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
Original file line number Diff line number Diff line change @@ -45,6 +45,15 @@ @implementation YYCache (SDAdditions)
45
45
46
46
// First check the in-memory cache...
47
47
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
+
48
57
BOOL shouldQueryMemoryOnly = (image && !(options & SDImageCacheQueryMemoryData));
49
58
if (shouldQueryMemoryOnly) {
50
59
if (doneBlock) {
You can’t perform that action at this time.
0 commit comments