FLTImagePickerPhotoAssetUtil.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2013 The Flutter Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #import <Foundation/Foundation.h>
  5. #import <Photos/Photos.h>
  6. #import "FLTImagePickerImageUtil.h"
  7. NS_ASSUME_NONNULL_BEGIN
  8. @interface FLTImagePickerPhotoAssetUtil : NSObject
  9. + (nullable PHAsset *)getAssetFromImagePickerInfo:(NSDictionary *)info;
  10. // Save image with correct meta data and extention copied from the original asset.
  11. // maxWidth and maxHeight are used only for GIF images.
  12. + (NSString *)saveImageWithOriginalImageData:(NSData *)originalImageData
  13. image:(UIImage *)image
  14. maxWidth:(nullable NSNumber *)maxWidth
  15. maxHeight:(nullable NSNumber *)maxHeight
  16. imageQuality:(nullable NSNumber *)imageQuality;
  17. // Save image with correct meta data and extention copied from image picker result info.
  18. + (NSString *)saveImageWithPickerInfo:(nullable NSDictionary *)info
  19. image:(UIImage *)image
  20. imageQuality:(nullable NSNumber *)imageQuality;
  21. @end
  22. NS_ASSUME_NONNULL_END