This commit is contained in:
启星
2025-08-08 10:49:36 +08:00
parent 6400cf78bb
commit b5ce3d580a
8780 changed files with 978183 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// Copyright (c) 2024 Tencent. All rights reserved.
// Author: eddardliu
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TUIMultimediaImageUtil : NSObject
// 对View截图
+ (UIImage *)imageFromView:(UIView *)view;
// 对View截图带旋转
+ (UIImage *)imageFromView:(UIView *)view withRotate:(CGFloat)rotate;
// 以另一图片为模版,创建一个形状大小相同,但颜色不同的图片,保留透明通道,不保留灰度信息
+ (UIImage *)imageFromImage:(UIImage *)img withTintColor:(UIColor *)tintColor;
+ (UIImage *)resizeImage:(UIImage *)img toSize:(CGSize)size;
+ (UIImage *)rotateImage:(UIImage *)img angle:(float)angle;
+ (UIImage *)imageWithColor:(UIColor *)color; // size: 1x1
+ (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
+ (UIImage *)createBlueCircleWithWhiteBorder:(CGSize)size withColor:(UIColor*) color;
@end
NS_ASSUME_NONNULL_END