23 lines
636 B
Objective-C
23 lines
636 B
Objective-C
//
|
|
// UIImage+Scale.h
|
|
// Meet
|
|
//
|
|
// Created by yuqingyuan on 2018/9/28.
|
|
// Copyright © 2018年 ko1o. All rights reserved.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
@interface UIImage (Scale)
|
|
|
|
+ (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)size;
|
|
+ (UIImage *)imageWithImage:(UIImage *)image scaledToMaxWidth:(CGFloat)width maxHeight:(CGFloat)height;
|
|
+ (CGSize)sizeWithImageSize:(CGSize)size scaledToMaxWidth:(CGFloat)width maxHeight:(CGFloat)height;
|
|
|
|
NSData *compressImageToDataIfNeed(UIImage *image);
|
|
|
|
UIImage *compressImageToSizeIfNeed(UIImage *image, int size);
|
|
NSData *comprossImageToSize(UIImage *image, int size);
|
|
|
|
@end
|