From 7b02207537d35bfa1714bf8beafc921f717d100a Mon Sep 17 00:00:00 2001 From: 单军华 Date: Wed, 11 Jul 2018 10:47:42 +0800 Subject: [PATCH] 首次上传 --- screendisplay/Pods/SDWebImage/SDWebImage/SDWebImageCoder.m | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/screendisplay/Pods/SDWebImage/SDWebImage/SDWebImageCoder.m b/screendisplay/Pods/SDWebImage/SDWebImage/SDWebImageCoder.m new file mode 100644 index 0000000..9357fe5 --- /dev/null +++ b/screendisplay/Pods/SDWebImage/SDWebImage/SDWebImageCoder.m @@ -0,0 +1,31 @@ +/* + * 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 "SDWebImageCoder.h" + +NSString * const SDWebImageCoderScaleDownLargeImagesKey = @"scaleDownLargeImages"; + +CGColorSpaceRef SDCGColorSpaceGetDeviceRGB(void) { + static CGColorSpaceRef colorSpace; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + colorSpace = CGColorSpaceCreateDeviceRGB(); + }); + return colorSpace; +} + +BOOL SDCGImageRefContainsAlpha(CGImageRef imageRef) { + if (!imageRef) { + return NO; + } + CGImageAlphaInfo alphaInfo = CGImageGetAlphaInfo(imageRef); + BOOL hasAlpha = !(alphaInfo == kCGImageAlphaNone || + alphaInfo == kCGImageAlphaNoneSkipFirst || + alphaInfo == kCGImageAlphaNoneSkipLast); + return hasAlpha; +} -- Gitblit v1.8.0