Repository: mbcharbonneau/UIImage-Categories Branch: master Commit: 8867113bfec5 Files: 15 Total size: 40.6 KB Directory structure: gitextract_ayx6znvn/ ├── .gitignore ├── Info.plist ├── LICENSE ├── README.md ├── UIImage+Alpha.h ├── UIImage+Alpha.m ├── UIImage+Resize.h ├── UIImage+Resize.m ├── UIImage+RoundedCorner.h ├── UIImage+RoundedCorner.m ├── UIImage-Categories.podspec ├── UIImage-Categories.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── xcshareddata/ │ └── xcschemes/ │ └── UIImage-Categories.xcscheme └── UIImageCategories.h ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ ## Build generated build/ DerivedData/ ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ ## Other *.moved-aside *.xcuserstate ## Obj-C/Swift specific *.hmap *.ipa *.dSYM.zip *.dSYM ================================================ FILE: Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass ================================================ FILE: LICENSE ================================================ Copyright (c) 2013 Marc Charbonneau Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # UIImage Categories ## About UIImage Categories is a fork of Trevor Harmon's category methods for cropping and resizing UIImage objects in iOS. Read more on [his 2009 blog post on the subject](http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/): >Despite its ease of use, or perhaps because of it, UIImage suffers from some serious limitations. Key among these is its lack of support for resizing the image, a feature that is normally handled dynamically by its companion, the UIImageView component. However, should an iPhone application need to reduce the size of an image for storage or for exchange with an external entity (such as a web server), the UIImage class is insufficient. This fork includes several fixes for compiler warnings and drawing bugs which have surfaced in newer versions of the iOS SDK. ## Contributing PRs are welcome, but please include some test images to demonstrate what's being fixed. That way I can test against regressions when merging future changes! ================================================ FILE: UIImage+Alpha.h ================================================ // UIImage+Alpha.h // Created by Trevor Harmon on 9/20/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. #import // Helper methods for adding an alpha layer to an image @interface UIImage (Alpha) - (BOOL)hasAlpha; - (UIImage *)imageWithAlpha; - (UIImage *)transparentBorderImage:(NSUInteger)borderSize; - (CGImageRef)newBorderMask:(NSUInteger)borderSize size:(CGSize)size; @end ================================================ FILE: UIImage+Alpha.m ================================================ // UIImage+Alpha.m // Created by Trevor Harmon on 9/20/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. #import "UIImage+Alpha.h" @implementation UIImage (Alpha) // Returns true if the image has an alpha layer - (BOOL)hasAlpha { CGImageAlphaInfo alpha = CGImageGetAlphaInfo(self.CGImage); return (alpha == kCGImageAlphaFirst || alpha == kCGImageAlphaLast || alpha == kCGImageAlphaPremultipliedFirst || alpha == kCGImageAlphaPremultipliedLast); } // Returns a copy of the given image, adding an alpha channel if it doesn't already have one - (UIImage *)imageWithAlpha { if ([self hasAlpha]) { return self; } CGFloat scale = MAX(self.scale, 1.0f); CGImageRef imageRef = self.CGImage; size_t width = CGImageGetWidth(imageRef)*scale; size_t height = CGImageGetHeight(imageRef)*scale; // The bitsPerComponent and bitmapInfo values are hard-coded to prevent an "unsupported parameter combination" error CGContextRef offscreenContext = CGBitmapContextCreate(NULL, width, height, 8, 0, CGImageGetColorSpace(imageRef), kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst); // Draw the image into the context and retrieve the new image, which will now have an alpha layer CGContextDrawImage(offscreenContext, CGRectMake(0, 0, width, height), imageRef); CGImageRef imageRefWithAlpha = CGBitmapContextCreateImage(offscreenContext); UIImage *imageWithAlpha = [UIImage imageWithCGImage:imageRefWithAlpha scale:self.scale orientation:UIImageOrientationUp]; // Clean up CGContextRelease(offscreenContext); CGImageRelease(imageRefWithAlpha); return imageWithAlpha; } // Returns a copy of the image with a transparent border of the given size added around its edges. // If the image has no alpha layer, one will be added to it. - (UIImage *)transparentBorderImage:(NSUInteger)borderSize { // If the image does not have an alpha layer, add one UIImage *image = [self imageWithAlpha]; CGFloat scale = MAX(self.scale, 1.0f); NSUInteger scaledBorderSize = borderSize * scale; CGRect newRect = CGRectMake(0, 0, image.size.width * scale + scaledBorderSize * 2, image.size.height * scale + scaledBorderSize * 2); // Build a context that's the same dimensions as the new size CGContextRef bitmap = CGBitmapContextCreate(NULL, newRect.size.width, newRect.size.height, CGImageGetBitsPerComponent(self.CGImage), 0, CGImageGetColorSpace(self.CGImage), CGImageGetBitmapInfo(self.CGImage)); // Draw the image in the center of the context, leaving a gap around the edges CGRect imageLocation = CGRectMake(scaledBorderSize, scaledBorderSize, image.size.width*scale, image.size.height*scale); CGContextDrawImage(bitmap, imageLocation, self.CGImage); CGImageRef borderImageRef = CGBitmapContextCreateImage(bitmap); // Create a mask to make the border transparent, and combine it with the image CGImageRef maskImageRef = [self newBorderMask:scaledBorderSize size:newRect.size]; CGImageRef transparentBorderImageRef = CGImageCreateWithMask(borderImageRef, maskImageRef); UIImage *transparentBorderImage = [UIImage imageWithCGImage:transparentBorderImageRef scale:self.scale orientation:UIImageOrientationUp]; // Clean up CGContextRelease(bitmap); CGImageRelease(borderImageRef); CGImageRelease(maskImageRef); CGImageRelease(transparentBorderImageRef); return transparentBorderImage; } #pragma mark - #pragma mark Private helper methods // Creates a mask that makes the outer edges transparent and everything else opaque // The size must include the entire mask (opaque part + transparent border) // The caller is responsible for releasing the returned reference by calling CGImageRelease - (CGImageRef)newBorderMask:(NSUInteger)borderSize size:(CGSize)size { CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); // Build a context that's the same dimensions as the new size CGContextRef maskContext = CGBitmapContextCreate(NULL, size.width, size.height, 8, // 8-bit grayscale 0, colorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaNone); // Start with a mask that's entirely transparent CGContextSetFillColorWithColor(maskContext, [UIColor blackColor].CGColor); CGContextFillRect(maskContext, CGRectMake(0, 0, size.width, size.height)); // Make the inner part (within the border) opaque CGContextSetFillColorWithColor(maskContext, [UIColor whiteColor].CGColor); CGContextFillRect(maskContext, CGRectMake(borderSize, borderSize, size.width - borderSize * 2, size.height - borderSize * 2)); // Get an image of the context CGImageRef maskImageRef = CGBitmapContextCreateImage(maskContext); // Clean up CGContextRelease(maskContext); CGColorSpaceRelease(colorSpace); return maskImageRef; } @end ================================================ FILE: UIImage+Resize.h ================================================ // UIImage+Resize.h // Created by Trevor Harmon on 8/5/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. #import // Extends the UIImage class to support resizing/cropping @interface UIImage (Resize) - (UIImage *)croppedImage:(CGRect)bounds; - (UIImage *)thumbnailImage:(NSInteger)thumbnailSize transparentBorder:(NSUInteger)borderSize cornerRadius:(NSUInteger)cornerRadius interpolationQuality:(CGInterpolationQuality)quality; - (UIImage *)resizedImage:(CGSize)newSize interpolationQuality:(CGInterpolationQuality)quality; - (UIImage *)resizedImageWithContentMode:(UIViewContentMode)contentMode bounds:(CGSize)bounds interpolationQuality:(CGInterpolationQuality)quality; - (UIImage *)resizedImage:(CGSize)newSize transform:(CGAffineTransform)transform drawTransposed:(BOOL)transpose interpolationQuality:(CGInterpolationQuality)quality; - (CGAffineTransform)transformForOrientation:(CGSize)newSize; @end ================================================ FILE: UIImage+Resize.m ================================================ // UIImage+Resize.m // Created by Trevor Harmon on 8/5/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. #import "UIImage+Resize.h" #import "UIImage+RoundedCorner.h" #import "UIImage+Alpha.h" @implementation UIImage (Resize) // Returns a copy of this image that is cropped to the given bounds. // The bounds will be adjusted using CGRectIntegral. // This method ignores the image's imageOrientation setting. - (UIImage *)croppedImage:(CGRect)bounds { CGFloat scale = MAX(self.scale, 1.0f); CGRect scaledBounds = CGRectMake(bounds.origin.x * scale, bounds.origin.y * scale, bounds.size.width * scale, bounds.size.height * scale); CGImageRef imageRef = CGImageCreateWithImageInRect([self CGImage], scaledBounds); UIImage *croppedImage = [UIImage imageWithCGImage:imageRef scale:self.scale orientation:UIImageOrientationUp]; CGImageRelease(imageRef); return croppedImage; } // Returns a copy of this image that is squared to the thumbnail size. // If transparentBorder is non-zero, a transparent border of the given size will be added around the edges of the thumbnail. (Adding a transparent border of at least one pixel in size has the side-effect of antialiasing the edges of the image when rotating it using Core Animation.) - (UIImage *)thumbnailImage:(NSInteger)thumbnailSize transparentBorder:(NSUInteger)borderSize cornerRadius:(NSUInteger)cornerRadius interpolationQuality:(CGInterpolationQuality)quality { UIImage *resizedImage = [self resizedImageWithContentMode:UIViewContentModeScaleAspectFill bounds:CGSizeMake(thumbnailSize, thumbnailSize) interpolationQuality:quality]; // Crop out any part of the image that's larger than the thumbnail size // The cropped rect must be centered on the resized image // Round the origin points so that the size isn't altered when CGRectIntegral is later invoked CGRect cropRect = CGRectMake(round((resizedImage.size.width - thumbnailSize) / 2), round((resizedImage.size.height - thumbnailSize) / 2), thumbnailSize, thumbnailSize); UIImage *croppedImage = [resizedImage croppedImage:cropRect]; UIImage *transparentBorderImage = borderSize ? [croppedImage transparentBorderImage:borderSize] : croppedImage; return [transparentBorderImage roundedCornerImage:cornerRadius borderSize:borderSize]; } // Returns a rescaled copy of the image, taking into account its orientation // The image will be scaled disproportionately if necessary to fit the bounds specified by the parameter - (UIImage *)resizedImage:(CGSize)newSize interpolationQuality:(CGInterpolationQuality)quality { BOOL drawTransposed; switch ( self.imageOrientation ) { case UIImageOrientationLeft: case UIImageOrientationLeftMirrored: case UIImageOrientationRight: case UIImageOrientationRightMirrored: drawTransposed = YES; break; default: drawTransposed = NO; } CGAffineTransform transform = [self transformForOrientation:newSize]; return [self resizedImage:newSize transform:transform drawTransposed:drawTransposed interpolationQuality:quality]; } // Resizes the image according to the given content mode, taking into account the image's orientation - (UIImage *)resizedImageWithContentMode:(UIViewContentMode)contentMode bounds:(CGSize)bounds interpolationQuality:(CGInterpolationQuality)quality { CGFloat horizontalRatio = bounds.width / self.size.width; CGFloat verticalRatio = bounds.height / self.size.height; CGFloat ratio; switch (contentMode) { case UIViewContentModeScaleAspectFill: ratio = MAX(horizontalRatio, verticalRatio); break; case UIViewContentModeScaleAspectFit: ratio = MIN(horizontalRatio, verticalRatio); break; default: [NSException raise:NSInvalidArgumentException format:@"Unsupported content mode: %ld", (long)contentMode]; } CGSize newSize = CGSizeMake(self.size.width * ratio, self.size.height * ratio); return [self resizedImage:newSize interpolationQuality:quality]; } #pragma mark - #pragma mark Private helper methods // Returns a copy of the image that has been transformed using the given affine transform and scaled to the new size // The new image's orientation will be UIImageOrientationUp, regardless of the current image's orientation // If the new size is not integral, it will be rounded up - (UIImage *)resizedImage:(CGSize)newSize transform:(CGAffineTransform)transform drawTransposed:(BOOL)transpose interpolationQuality:(CGInterpolationQuality)quality { CGFloat scale = MAX(1.0f, self.scale); CGRect newRect = CGRectIntegral(CGRectMake(0, 0, newSize.width*scale, newSize.height*scale)); CGRect transposedRect = CGRectMake(0, 0, newRect.size.height, newRect.size.width); CGImageRef imageRef = self.CGImage; // Fix for a colorspace / transparency issue that affects some types of // images. See here: http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/comment-page-2/#comment-39951 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef bitmap = CGBitmapContextCreate( NULL, newRect.size.width, newRect.size.height, 8, /* bits per channel */ (newRect.size.width * 4), /* 4 channels per pixel * numPixels/row */ colorSpace, kCGImageAlphaPremultipliedLast ); CGColorSpaceRelease(colorSpace); // Rotate and/or flip the image if required by its orientation CGContextConcatCTM(bitmap, transform); // Set the quality level to use when rescaling CGContextSetInterpolationQuality(bitmap, quality); // Draw into the context; this scales the image CGContextDrawImage(bitmap, transpose ? transposedRect : newRect, imageRef); // Get the resized image from the context and a UIImage CGImageRef newImageRef = CGBitmapContextCreateImage(bitmap); UIImage *newImage = [UIImage imageWithCGImage:newImageRef scale:self.scale orientation:UIImageOrientationUp]; // Clean up CGContextRelease(bitmap); CGImageRelease(newImageRef); return newImage; } // Returns an affine transform that takes into account the image orientation when drawing a scaled image - (CGAffineTransform)transformForOrientation:(CGSize)newSize { CGAffineTransform transform = CGAffineTransformIdentity; switch (self.imageOrientation) { case UIImageOrientationDown: // EXIF = 3 case UIImageOrientationDownMirrored: // EXIF = 4 transform = CGAffineTransformTranslate(transform, newSize.width, newSize.height); transform = CGAffineTransformRotate(transform, M_PI); break; case UIImageOrientationLeft: // EXIF = 6 case UIImageOrientationLeftMirrored: // EXIF = 5 transform = CGAffineTransformTranslate(transform, newSize.width, 0); transform = CGAffineTransformRotate(transform, M_PI_2); break; case UIImageOrientationRight: // EXIF = 8 case UIImageOrientationRightMirrored: // EXIF = 7 transform = CGAffineTransformTranslate(transform, 0, newSize.height); transform = CGAffineTransformRotate(transform, -M_PI_2); break; default: break; } switch (self.imageOrientation) { case UIImageOrientationUpMirrored: // EXIF = 2 case UIImageOrientationDownMirrored: // EXIF = 4 transform = CGAffineTransformTranslate(transform, newSize.width, 0); transform = CGAffineTransformScale(transform, -1, 1); break; case UIImageOrientationLeftMirrored: // EXIF = 5 case UIImageOrientationRightMirrored: // EXIF = 7 transform = CGAffineTransformTranslate(transform, newSize.height, 0); transform = CGAffineTransformScale(transform, -1, 1); break; default: break; } return transform; } @end ================================================ FILE: UIImage+RoundedCorner.h ================================================ // UIImage+RoundedCorner.h // Created by Trevor Harmon on 9/20/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. #import // Extends the UIImage class to support making rounded corners @interface UIImage (RoundedCorner) - (UIImage *)roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize; - (void)addRoundedRectToPath:(CGRect)rect context:(CGContextRef)context ovalWidth:(CGFloat)ovalWidth ovalHeight:(CGFloat)ovalHeight; @end ================================================ FILE: UIImage+RoundedCorner.m ================================================ // UIImage+RoundedCorner.m // Created by Trevor Harmon on 9/20/09. // Free for personal or commercial use, with or without modification. // No warranty is expressed or implied. #import "UIImage+RoundedCorner.h" #import "UIImage+Alpha.h" @implementation UIImage (RoundedCorner) // Creates a copy of this image with rounded corners // If borderSize is non-zero, a transparent border of the given size will also be added // Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/ - (UIImage *)roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize { // If the image does not have an alpha layer, add one UIImage *image = [self imageWithAlpha]; CGFloat scale = MAX(self.scale,1.0f); NSUInteger scaledBorderSize = borderSize * scale; // Build a context that's the same dimensions as the new size CGContextRef context = CGBitmapContextCreate(NULL, image.size.width*scale, image.size.height*scale, CGImageGetBitsPerComponent(image.CGImage), 0, CGImageGetColorSpace(image.CGImage), CGImageGetBitmapInfo(image.CGImage)); // Create a clipping path with rounded corners CGContextBeginPath(context); [self addRoundedRectToPath:CGRectMake(scaledBorderSize, scaledBorderSize, image.size.width*scale - borderSize * 2, image.size.height*scale - borderSize * 2) context:context ovalWidth:cornerSize*scale ovalHeight:cornerSize*scale]; CGContextClosePath(context); CGContextClip(context); // Draw the image to the context; the clipping path will make anything outside the rounded rect transparent CGContextDrawImage(context, CGRectMake(0, 0, image.size.width*scale, image.size.height*scale), image.CGImage); // Create a CGImage from the context CGImageRef clippedImage = CGBitmapContextCreateImage(context); CGContextRelease(context); // Create a UIImage from the CGImage UIImage *roundedImage = [UIImage imageWithCGImage:clippedImage scale:self.scale orientation:UIImageOrientationUp]; CGImageRelease(clippedImage); return roundedImage; } #pragma mark - #pragma mark Private helper methods // Adds a rectangular path to the given context and rounds its corners by the given extents // Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/ - (void)addRoundedRectToPath:(CGRect)rect context:(CGContextRef)context ovalWidth:(CGFloat)ovalWidth ovalHeight:(CGFloat)ovalHeight { if (ovalWidth == 0 || ovalHeight == 0) { CGContextAddRect(context, rect); return; } CGContextSaveGState(context); CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect)); CGContextScaleCTM(context, ovalWidth, ovalHeight); CGFloat fw = CGRectGetWidth(rect) / ovalWidth; CGFloat fh = CGRectGetHeight(rect) / ovalHeight; CGContextMoveToPoint(context, fw, fh/2); CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1); CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1); CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1); CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1); CGContextClosePath(context); CGContextRestoreGState(context); } @end ================================================ FILE: UIImage-Categories.podspec ================================================ # # Be sure to run `pod spec lint UIImage-Categories.podspec' to ensure this is a # valid spec and remove all comments before submitting the spec. # # To learn more about the attributes see http://docs.cocoapods.org/specification.html # Pod::Spec.new do |s| s.name = "UIImage-Categories" s.version = "1.0.0" s.summary = "Image resizing and cropping utilities (originally by Trevor Harmon)." s.description = <<-DESC For more information, see: http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/ . DESC s.homepage = "https://github.com/mbcharbonneau/UIImage-Categories" s.license = { type: 'MIT', file: 'LICENSE' } s.author = { "Marc Charbonneau" => "marc@mbcharbonneau.com" } s.source = { :git => "https://github.com/mbcharbonneau/UIImage-Categories.git", :tag => "v#{s.version}" } s.platform = :ios, '5.0' s.ios.deployment_target = '5.0' s.source_files = 'UIImage*.{h,m}' s.public_header_files = 'UIImage*.h' s.requires_arc = true end ================================================ FILE: UIImage-Categories.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 7C9A14EE1D1733CB0006B90D /* UIImage+Alpha.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9A14E81D1733CB0006B90D /* UIImage+Alpha.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7C9A14EF1D1733CB0006B90D /* UIImage+Alpha.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C9A14E91D1733CB0006B90D /* UIImage+Alpha.m */; }; 7C9A14F01D1733CB0006B90D /* UIImage+Resize.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9A14EA1D1733CB0006B90D /* UIImage+Resize.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7C9A14F11D1733CB0006B90D /* UIImage+Resize.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C9A14EB1D1733CB0006B90D /* UIImage+Resize.m */; }; 7C9A14F21D1733CB0006B90D /* UIImage+RoundedCorner.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9A14EC1D1733CB0006B90D /* UIImage+RoundedCorner.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7C9A14F31D1733CB0006B90D /* UIImage+RoundedCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C9A14ED1D1733CB0006B90D /* UIImage+RoundedCorner.m */; }; 7C9A14F51D17346D0006B90D /* UIImageCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C9A14F41D17346D0006B90D /* UIImageCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7C9A14F71D1736580006B90D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C9A14F61D1736580006B90D /* UIKit.framework */; }; 7C9A14FA1D1736750006B90D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C9A14F91D1736750006B90D /* Foundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 7C9A14DD1D17337D0006B90D /* UIImageCategories.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIImageCategories.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7C9A14E81D1733CB0006B90D /* UIImage+Alpha.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Alpha.h"; sourceTree = SOURCE_ROOT; }; 7C9A14E91D1733CB0006B90D /* UIImage+Alpha.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Alpha.m"; sourceTree = SOURCE_ROOT; }; 7C9A14EA1D1733CB0006B90D /* UIImage+Resize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Resize.h"; sourceTree = SOURCE_ROOT; }; 7C9A14EB1D1733CB0006B90D /* UIImage+Resize.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Resize.m"; sourceTree = SOURCE_ROOT; }; 7C9A14EC1D1733CB0006B90D /* UIImage+RoundedCorner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RoundedCorner.h"; sourceTree = SOURCE_ROOT; }; 7C9A14ED1D1733CB0006B90D /* UIImage+RoundedCorner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RoundedCorner.m"; sourceTree = SOURCE_ROOT; }; 7C9A14F41D17346D0006B90D /* UIImageCategories.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImageCategories.h; sourceTree = SOURCE_ROOT; }; 7C9A14F61D1736580006B90D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 7C9A14F91D1736750006B90D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 7C9A14D91D17337D0006B90D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 7C9A14FA1D1736750006B90D /* Foundation.framework in Frameworks */, 7C9A14F71D1736580006B90D /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 7C9A14D31D17337D0006B90D = { isa = PBXGroup; children = ( 7C9A14DF1D17337D0006B90D /* UIImage-Categories */, 7C9A14F81D1736630006B90D /* Frameworks */, 7C9A14DE1D17337D0006B90D /* Products */, ); sourceTree = ""; }; 7C9A14DE1D17337D0006B90D /* Products */ = { isa = PBXGroup; children = ( 7C9A14DD1D17337D0006B90D /* UIImageCategories.framework */, ); name = Products; sourceTree = ""; }; 7C9A14DF1D17337D0006B90D /* UIImage-Categories */ = { isa = PBXGroup; children = ( 7C9A14F41D17346D0006B90D /* UIImageCategories.h */, 7C9A14E81D1733CB0006B90D /* UIImage+Alpha.h */, 7C9A14E91D1733CB0006B90D /* UIImage+Alpha.m */, 7C9A14EA1D1733CB0006B90D /* UIImage+Resize.h */, 7C9A14EB1D1733CB0006B90D /* UIImage+Resize.m */, 7C9A14EC1D1733CB0006B90D /* UIImage+RoundedCorner.h */, 7C9A14ED1D1733CB0006B90D /* UIImage+RoundedCorner.m */, ); path = "UIImage-Categories"; sourceTree = ""; }; 7C9A14F81D1736630006B90D /* Frameworks */ = { isa = PBXGroup; children = ( 7C9A14F91D1736750006B90D /* Foundation.framework */, 7C9A14F61D1736580006B90D /* UIKit.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 7C9A14DA1D17337D0006B90D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 7C9A14F01D1733CB0006B90D /* UIImage+Resize.h in Headers */, 7C9A14F21D1733CB0006B90D /* UIImage+RoundedCorner.h in Headers */, 7C9A14F51D17346D0006B90D /* UIImageCategories.h in Headers */, 7C9A14EE1D1733CB0006B90D /* UIImage+Alpha.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 7C9A14DC1D17337D0006B90D /* UIImage-Categories */ = { isa = PBXNativeTarget; buildConfigurationList = 7C9A14E51D17337D0006B90D /* Build configuration list for PBXNativeTarget "UIImage-Categories" */; buildPhases = ( 7C9A14D81D17337D0006B90D /* Sources */, 7C9A14D91D17337D0006B90D /* Frameworks */, 7C9A14DA1D17337D0006B90D /* Headers */, 7C9A14DB1D17337D0006B90D /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "UIImage-Categories"; productName = "UIImage-Categories"; productReference = 7C9A14DD1D17337D0006B90D /* UIImageCategories.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 7C9A14D41D17337D0006B90D /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0730; ORGANIZATIONNAME = "UIImage-Categories"; TargetAttributes = { 7C9A14DC1D17337D0006B90D = { CreatedOnToolsVersion = 7.3.1; }; }; }; buildConfigurationList = 7C9A14D71D17337D0006B90D /* Build configuration list for PBXProject "UIImage-Categories" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = 7C9A14D31D17337D0006B90D; productRefGroup = 7C9A14DE1D17337D0006B90D /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 7C9A14DC1D17337D0006B90D /* UIImage-Categories */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 7C9A14DB1D17337D0006B90D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 7C9A14D81D17337D0006B90D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 7C9A14EF1D1733CB0006B90D /* UIImage+Alpha.m in Sources */, 7C9A14F31D1733CB0006B90D /* UIImage+RoundedCorner.m in Sources */, 7C9A14F11D1733CB0006B90D /* UIImage+Resize.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 7C9A14E31D17337D0006B90D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; 7C9A14E41D17337D0006B90D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 7C9A14E61D17337D0006B90D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mbcharbonneau.UIImageCategories; PRODUCT_NAME = UIImageCategories; SKIP_INSTALL = YES; }; name = Debug; }; 7C9A14E71D17337D0006B90D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mbcharbonneau.UIImageCategories; PRODUCT_NAME = UIImageCategories; SKIP_INSTALL = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 7C9A14D71D17337D0006B90D /* Build configuration list for PBXProject "UIImage-Categories" */ = { isa = XCConfigurationList; buildConfigurations = ( 7C9A14E31D17337D0006B90D /* Debug */, 7C9A14E41D17337D0006B90D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 7C9A14E51D17337D0006B90D /* Build configuration list for PBXNativeTarget "UIImage-Categories" */ = { isa = XCConfigurationList; buildConfigurations = ( 7C9A14E61D17337D0006B90D /* Debug */, 7C9A14E71D17337D0006B90D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 7C9A14D41D17337D0006B90D /* Project object */; } ================================================ FILE: UIImage-Categories.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: UIImage-Categories.xcodeproj/xcshareddata/xcschemes/UIImage-Categories.xcscheme ================================================ ================================================ FILE: UIImageCategories.h ================================================ // // UIImage-Categories.h // UIImage-Categories // // Created by Iyuna on 6/19/16. // Copyright © 2016 UIImage-Categories. All rights reserved. // #import #import #import