UIImage+HXExtension.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // UIImage+HXExtension.h
  3. // HXPhotoPickerExample
  4. //
  5. // Created by Silence on 17/2/15.
  6. // Copyright © 2017年 Silence. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <CoreMedia/CoreMedia.h>
  10. @interface UIImage (HXExtension)
  11. + (UIImage *)hx_imageNamed:(NSString *)imageName;
  12. + (UIImage *)hx_imageContentsOfFile:(NSString *)imageName;
  13. + (UIImage *)hx_thumbnailImageForVideo:(NSURL *)videoURL
  14. atTime:(NSTimeInterval)time;
  15. + (UIImage *)hx_animatedGIFWithData:(NSData *)data;
  16. + (UIImage *)hx_animatedGIFWithURL:(NSURL *)URL;
  17. - (UIImage *)hx_normalizedImage;
  18. - (UIImage *)hx_scaleImagetoScale:(float)scaleSize;
  19. - (UIImage *)hx_rotationImage:(UIImageOrientation)orient;
  20. + (UIImage *)hx_imageWithColor:(UIColor *)color havingSize:(CGSize)size;
  21. - (UIImage *)hx_cropInRect:(CGRect)rect;
  22. - (UIImage *)hx_roundClipingImage;
  23. - (UIImage *)hx_scaleToFillSize:(CGSize)size;
  24. - (UIImage *)hx_mergeimages:(NSArray <UIImage *>*)images;
  25. + (UIImage *)hx_mergeimages:(NSArray <UIImage *>*)images;
  26. + (CGSize)hx_scaleImageSizeBySize:(CGSize)imageSize targetSize:(CGSize)size isBoth:(BOOL)isBoth ;
  27. - (UIImage *)hx_scaleToFitSize:(CGSize)size;
  28. @end