From 3e8437ae559487362fae3525beb79c534c213a51 Mon Sep 17 00:00:00 2001
From: 单军华
Date: Thu, 12 Jul 2018 13:44:34 +0800
Subject: [PATCH] bug修复和功能优化

---
 screendisplay/Pods/SDWebImage/SDWebImage/NSImage+WebCache.m |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/screendisplay/Pods/SDWebImage/SDWebImage/NSImage+WebCache.m b/screendisplay/Pods/SDWebImage/SDWebImage/NSImage+WebCache.m
new file mode 100644
index 0000000..140ed6c
--- /dev/null
+++ b/screendisplay/Pods/SDWebImage/SDWebImage/NSImage+WebCache.m
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the SDWebImage package.
+ * (c) Olivier Poitrey <rs@dailymotion.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+#import "NSImage+WebCache.h"
+
+#if SD_MAC
+
+@implementation NSImage (WebCache)
+
+- (CGImageRef)CGImage {
+    NSRect imageRect = NSMakeRect(0, 0, self.size.width, self.size.height);
+    CGImageRef cgImage = [self CGImageForProposedRect:&imageRect context:NULL hints:nil];
+    return cgImage;
+}
+
+- (NSArray<NSImage *> *)images {
+    return nil;
+}
+
+- (BOOL)isGIF {
+    BOOL isGIF = NO;
+    for (NSImageRep *rep in self.representations) {
+        if ([rep isKindOfClass:[NSBitmapImageRep class]]) {
+            NSBitmapImageRep *bitmapRep = (NSBitmapImageRep *)rep;
+            NSUInteger frameCount = [[bitmapRep valueForProperty:NSImageFrameCount] unsignedIntegerValue];
+            isGIF = frameCount > 1 ? YES : NO;
+            break;
+        }
+    }
+    return isGIF;
+}
+
+@end
+
+#endif
+

--
Gitblit v1.8.0