SDImageIOAnimatedCoderInternal.h 1.3 KB

12345678910111213141516171819202122232425262728
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import <Foundation/Foundation.h>
  9. #import "SDImageIOAnimatedCoder.h"
  10. // AVFileTypeHEIC/AVFileTypeHEIF is defined in AVFoundation via iOS 11, we use this without import AVFoundation
  11. #define kSDUTTypeHEIC ((__bridge CFStringRef)@"public.heic")
  12. #define kSDUTTypeHEIF ((__bridge CFStringRef)@"public.heif")
  13. // HEIC Sequence (Animated Image)
  14. #define kSDUTTypeHEICS ((__bridge CFStringRef)@"public.heics")
  15. // kUTTypeWebP seems not defined in public UTI framework, Apple use the hardcode string, we define them :)
  16. #define kSDUTTypeWebP ((__bridge CFStringRef)@"org.webmproject.webp")
  17. @interface SDImageIOAnimatedCoder ()
  18. + (NSTimeInterval)frameDurationAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source;
  19. + (NSUInteger)imageLoopCountWithSource:(nonnull CGImageSourceRef)source;
  20. + (nullable UIImage *)createFrameAtIndex:(NSUInteger)index source:(nonnull CGImageSourceRef)source scale:(CGFloat)scale preserveAspectRatio:(BOOL)preserveAspectRatio thumbnailSize:(CGSize)thumbnailSize options:(nullable NSDictionary *)options;
  21. + (BOOL)canEncodeToFormat:(SDImageFormat)format;
  22. + (BOOL)canDecodeFromFormat:(SDImageFormat)format;
  23. @end