BU_SDAnimatedImageRep.h 971 B

12345678910111213141516171819202122
  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 "BU_SDWebImageCompat.h"
  9. #if SD_MAC
  10. /**
  11. A subclass of `NSBitmapImageRep` to fix that GIF loop count issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`.
  12. Built in GIF coder use this instead of `NSBitmapImageRep` for better GIF rendering. If you do not want this, only enable `SDImageIOCoder`, which just call `NSImage` API and actually use `NSBitmapImageRep` for GIF image.
  13. This also support APNG format using `SDImageAPNGCoder`. Which provide full alpha-channel support and the correct duration match the `kBUCGImagePropertyAPNGUnclampedDelayTime`.
  14. */
  15. @interface BU_SDAnimatedImageRep : NSBitmapImageRep
  16. @end
  17. #endif