酷店

UIImage+GIF.m 536B

1234567891011121314151617181920212223
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. * (c) Laurin Brandner
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. #import "UIImage+GIF.h"
  10. #import "SDImageGIFCoder.h"
  11. @implementation UIImage (GIF)
  12. + (nullable UIImage *)sd_imageWithGIFData:(nullable NSData *)data {
  13. if (!data) {
  14. return nil;
  15. }
  16. return [[SDImageGIFCoder sharedCoder] decodedImageWithData:data options:0];
  17. }
  18. @end