FUImageHelper.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // FUImageHelper.h
  3. // FULiveDemo
  4. //
  5. // Created by L on 2018/8/3.
  6. // Copyright © 2018年 L. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. @interface FUImageHelper : NSObject
  11. + (void) convertUIImageToBitmapRGBA8:(UIImage *) image completionHandler:(void (^)(int32_t size, unsigned char * bits))completionHandler ;
  12. + (UIImage *) convertBitmapRGBA8ToUIImage:(unsigned char *) buffer
  13. withWidth:(int) width
  14. withHeight:(int) height ;
  15. +(CVPixelBufferRef) pixelBufferFromImage:(UIImage *)image;
  16. +(UIImage *)imageFromPixelBuffer:(CVPixelBufferRef)pixelBufferRef;
  17. + (UIImage *)imageFromPixelBuffer2:(CVPixelBufferRef)pixelBufferRef;
  18. + (unsigned char *)getRGBAWithImage:(UIImage *)image;
  19. + (unsigned char *)getRGBAWithImageName:(NSString *)imageName width:(int *)width height:(int *)height;
  20. + (UIColor*)getPixelColorScreenWindowAtLocation:(CGPoint)point;
  21. + (UIColor*)getColorImage:(UIImage *)image withPoint:(CGPoint)point;
  22. @end