public class

WebpSupportStatus

extends Object
java.lang.Object
   ↳ com.facebook.common.webp.WebpSupportStatus

Summary

Fields
public static final boolean sIsExtendedWebpSupported
public static final boolean sIsSimpleWebpSupported
public static final boolean sIsWebpSupportRequired
public static WebpBitmapFactory sWebpBitmapFactory
Public Constructors
WebpSupportStatus()
Public Methods
static boolean isAnimatedWebpHeader(byte[] imageHeaderBytes, int offset)
static boolean isExtendedWebpHeader(byte[] imageHeaderBytes, int offset, int headerSize)
static boolean isExtendedWebpHeaderWithAlpha(byte[] imageHeaderBytes, int offset)
static boolean isLosslessWebpHeader(byte[] imageHeaderBytes, int offset)
static boolean isSimpleWebpHeader(byte[] imageHeaderBytes, int offset)
static boolean isWebpHeader(byte[] imageHeaderBytes, int offset, int headerSize)
Checks if imageHeaderBytes contains WEBP_RIFF_BYTES and WEBP_NAME_BYTES and if the header is long enough to be WebP's header.
static boolean isWebpSupportedByPlatform(byte[] imageHeaderBytes, int offset, int headerSize)
static WebpBitmapFactory loadWebpBitmapFactoryIfExists()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final boolean sIsExtendedWebpSupported

public static final boolean sIsSimpleWebpSupported

public static final boolean sIsWebpSupportRequired

public static WebpBitmapFactory sWebpBitmapFactory

Public Constructors

public WebpSupportStatus ()

Public Methods

public static boolean isAnimatedWebpHeader (byte[] imageHeaderBytes, int offset)

public static boolean isExtendedWebpHeader (byte[] imageHeaderBytes, int offset, int headerSize)

public static boolean isExtendedWebpHeaderWithAlpha (byte[] imageHeaderBytes, int offset)

public static boolean isLosslessWebpHeader (byte[] imageHeaderBytes, int offset)

public static boolean isSimpleWebpHeader (byte[] imageHeaderBytes, int offset)

public static boolean isWebpHeader (byte[] imageHeaderBytes, int offset, int headerSize)

Checks if imageHeaderBytes contains WEBP_RIFF_BYTES and WEBP_NAME_BYTES and if the header is long enough to be WebP's header. WebP file format can be found here: https://developers.google.com/speed/webp/docs/riff_container

Parameters
imageHeaderBytes image header bytes
Returns
  • true if imageHeaderBytes contains a valid webp header

public static boolean isWebpSupportedByPlatform (byte[] imageHeaderBytes, int offset, int headerSize)

public static WebpBitmapFactory loadWebpBitmapFactoryIfExists ()