cdts/xdts-ios 3/TreeHole/Code/Gategory/UIImageEx/UIImage+Scale.h

23 lines
636 B
C
Raw Normal View History

2023-07-27 09:20:00 +08:00
//
// 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