Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 88 lines (63 sloc) 3.421 kB
//
// UIImageAdditions.h
// Created by Devin Ross on 7/25/09.
//
/*
tapku || http://github.com/devinross/tapkulibrary
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.
*/
@import UIKit;
/** Additional functionality for `UIImage`. */
@interface UIImage (TKCategory)
+ (UIImage*) imageNamedTK:(NSString*)path;
- (UIImage *) imageCroppedToRect:(CGRect)rect;
@property (nonatomic, readonly, strong) UIImage *squareImage;
/** Creates and returns an image with the applyed lighting effect.
@return An image with the applied lighting effect.
*/
@property (nonatomic, readonly, strong) UIImage *imageByApplyingLightEffect;
/** Creates and returns an image with the applyed lighting effect.
@return An image with the applied lighting effect.
*/
@property (nonatomic, readonly, strong) UIImage *imageByApplyingExtraLightEffect;
/** Creates and returns an image with the applyed tint color.
@param blurRadius the blur radius applied to the image
@param saturation The saturation change applied to the original image. 1.0 is the default.
@return An image with the applied tint effect.
*/
- (UIImage*) imageByApplyingDarkEffectWithBlurRadius:(CGFloat)blurRadius saturationFactor:(CGFloat)saturation;
/** Creates and returns an image with the a dark tint color applied.
@return An image with the applied dark tint effect.
*/
@property (nonatomic, readonly, strong) UIImage *imageByApplyingDarkEffect;
/** Creates and returns an image with the applyed tint color.
@param tintColor The color that will applied to the image. For subtle changes, make sure the alpha of the color is less than 1.
@return An image with the applied tint effect.
*/
- (UIImage *) imageByApplyingTintEffectWithColor:(UIColor *)tintColor;
/** Creates and returns an image with the applyed blur, tint color, saturation change, and masked image.
@param blurRadius the blur radius applied to the image
@param tintColor The color that will applied to the image. For subtle changes, make sure the alpha of the color is less than 1.
@param saturationDeltaFactor The saturation change applied to the original image. 1.0 is the default.
@param maskImage The mask image applied to the original image.
@return An image with the applied blur.
*/
- (UIImage *) imageByApplyingBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage;
@end
Jump to Line
Something went wrong with that request. Please try again.