WFCCUtilities.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // WFCCUtilities.h
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/9/7.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "WFCCIMService.h"
  10. @interface WFCCUtilities : NSObject
  11. /**
  12. 生成缩略图
  13. @param image 原图
  14. @param targetWidth 宽度
  15. @param targetHeight 高度
  16. @return 缩略图
  17. */
  18. + (UIImage *)generateThumbnail:(UIImage *)image
  19. withWidth:(CGFloat)targetWidth
  20. withHeight:(CGFloat)targetHeight;
  21. /**
  22. 获取对应的沙盒路径
  23. @param localPath 文件路径
  24. @return 对应的沙盒路径
  25. */
  26. + (NSString *)getSendBoxFilePath:(NSString *)localPath;
  27. /**
  28. 获取资源路径
  29. @param componentPath 相对路径
  30. @return 资源路径
  31. */
  32. + (NSString *)getDocumentPathWithComponent:(NSString *)componentPath;
  33. + (CGSize)imageScaleSize:(CGSize)imageSize targetSize:(CGSize)targetSize thumbnailPoint:(CGPoint *)thumbnailPoint;
  34. + (UIImage *)imageWithRightOrientation:(UIImage *)aImage;
  35. + (NSString *)getGroupGridPortrait:(NSString *)groupId
  36. width:(int)width
  37. defaultUserPortrait:(UIImage *(^)(NSString *userId))defaultUserPortraitBlock;
  38. @end