UIImage+WebP.h 815 B

123456789101112131415161718192021222324252627
  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. #if __has_include(<SDWebImage/SDWebImage.h>)
  9. #import <SDWebImage/SDWebImage.h>
  10. #else
  11. @import SDWebImage;
  12. #endif
  13. // This category is just use as a convenience method. For more detail control, use methods in `UIImage+MultiFormat.h` or directlly use `SDImageCoder`
  14. @interface UIImage (WebP)
  15. /**
  16. Create a image from the WebP data.
  17. This will create animated image if the data is Animated WebP. And will create a static image is the data is Static WebP.
  18. @param data The WebP data
  19. @return The created image
  20. */
  21. + (nullable UIImage *)sd_imageWithWebPData:(nullable NSData *)data;
  22. @end