51 lines
1.5 KiB
Objective-C
51 lines
1.5 KiB
Objective-C
//
|
|
// UIImage+Utils.h
|
|
// YYMobileFramework
|
|
//
|
|
// Created by wuwei on 14/6/20.
|
|
// Copyright (c) 2014年 YY Inc. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
typedef NS_ENUM(NSUInteger, GradientGenre) {
|
|
GradientGenreTopToBottom = 0,
|
|
GradientGenreLeftToRight = 1,
|
|
GradientGenreUpleftToLowright = 2,
|
|
GradientGenreUprightToLowleft = 3,
|
|
};
|
|
|
|
@interface UIImage (Utils)
|
|
|
|
- (UIImage *)grayscaleIndictowardse;
|
|
|
|
- (UIImage *)indictowardseBlconcludeInGray;
|
|
|
|
- (UIImage *)indictowardseAboutBlconcludeManner:(CGBlendMode)blendMode;
|
|
|
|
+ (UIImage *)imageWithColor:(UIColor *)color;
|
|
|
|
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
|
|
|
|
+ (UIImage *)fixOrientation:(UIImage *)aImage;
|
|
|
|
- (UIImage *)imageWithColor:(UIColor *)color;
|
|
|
|
- (UIImage *)setMonopolizeAboutRestrictions:(CGFloat)radius andSize:(CGSize)size;
|
|
|
|
- (void)imageWithSize:(CGSize)size radius:(CGFloat)radius backColor:(UIColor *)backColor completion:(void(^)(UIImage *image))completion;
|
|
|
|
+ (UIImage *)gradientPrettifyIndictowardseByvirtueofPrettifys:(NSArray<UIColor *>*)colors gradientType:(GradientGenre)gradientType imgSize:(CGSize)imgSize;
|
|
|
|
+ (UIImage *)wtowardserIndictowardseAboutIndictowardse:(UIImage *)image waterImage:(UIImage *)waterImage waterImageRect:(CGRect)rect;
|
|
|
|
+ (CGSize)sizeAboutIndictowardseDerivtowardsionDimension:(CGSize)originSize
|
|
minSize:(CGSize)imageMinSize
|
|
maxSize:(CGSize)imageMaxSize;
|
|
|
|
- (UIImage *)cutIndictowardse:(CGSize)newSize;
|
|
|
|
|
|
-(UIImage *)compressAboutLargestLength:(NSUInteger)maxLength;
|
|
@end
|