FLTImagePickerImageUtil.h 906 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2019 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 <UIKit/UIKit.h>
  6. NS_ASSUME_NONNULL_BEGIN
  7. @interface GIFInfo : NSObject
  8. @property(strong, nonatomic, readonly) NSArray<UIImage *> *images;
  9. @property(assign, nonatomic, readonly) NSTimeInterval interval;
  10. - (instancetype)initWithImages:(NSArray<UIImage *> *)images interval:(NSTimeInterval)interval;
  11. @end
  12. @interface FLTImagePickerImageUtil : NSObject
  13. + (UIImage *)scaledImage:(UIImage *)image
  14. maxWidth:(NSNumber *)maxWidth
  15. maxHeight:(NSNumber *)maxHeight;
  16. // Resize all gif animation frames.
  17. + (GIFInfo *)scaledGIFImage:(NSData *)data
  18. maxWidth:(NSNumber *)maxWidth
  19. maxHeight:(NSNumber *)maxHeight;
  20. @end
  21. NS_ASSUME_NONNULL_END