UIImage(WebP)

@interface UIImage (WebP)

/**
 Create a image from the WebP data.
 This will create animated image if the data is Animated WebP. And will create a static image is the data is Static WebP.

 @param data The WebP data
 @return The created image
 */
+ (nullable UIImage *)sd_imageWithWebPData:(nullable NSData *)data;

@end
  • Create a image from the WebP data. This will create animated image if the data is Animated WebP. And will create a static image is the data is Static WebP.

    Declaration

    Objective-C

    + (nullable UIImage *)sd_imageWithWebPData:(nullable NSData *)data;

    Parameters

    data

    The WebP data

    Return Value

    The created image