public final class

DefaultImageFormats

extends Object
java.lang.Object
   ↳ com.facebook.imageformat.DefaultImageFormats

Class Overview

Default image formats that Fresco supports.

Summary

Fields
public static final ImageFormat BMP
public static final ImageFormat DNG
public static final ImageFormat GIF
public static final ImageFormat HEIF
public static final ImageFormat ICO
public static final ImageFormat JPEG
public static final ImageFormat PNG
public static final ImageFormat WEBP_ANIMATED
public static final ImageFormat WEBP_EXTENDED
public static final ImageFormat WEBP_EXTENDED_WITH_ALPHA
public static final ImageFormat WEBP_LOSSLESS
public static final ImageFormat WEBP_SIMPLE
Public Methods
static List<ImageFormat> getDefaultFormats()
Get all default formats supported by Fresco.
static boolean isStaticWebpFormat(ImageFormat imageFormat)
Check if the given image format is static WebP (not animated).
static boolean isWebpFormat(ImageFormat imageFormat)
Check if the given image format is a WebP image format (static or animated).
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final ImageFormat BMP

public static final ImageFormat DNG

public static final ImageFormat GIF

public static final ImageFormat HEIF

public static final ImageFormat ICO

public static final ImageFormat JPEG

public static final ImageFormat PNG

public static final ImageFormat WEBP_ANIMATED

public static final ImageFormat WEBP_EXTENDED

public static final ImageFormat WEBP_EXTENDED_WITH_ALPHA

public static final ImageFormat WEBP_LOSSLESS

public static final ImageFormat WEBP_SIMPLE

Public Methods

public static List<ImageFormat> getDefaultFormats ()

Get all default formats supported by Fresco. Does not include UNKNOWN.

Returns
  • all supported default formats

public static boolean isStaticWebpFormat (ImageFormat imageFormat)

Check if the given image format is static WebP (not animated).

Parameters
imageFormat the image format to check
Returns
  • true if static WebP

public static boolean isWebpFormat (ImageFormat imageFormat)

Check if the given image format is a WebP image format (static or animated).

Parameters
imageFormat the image format to check
Returns
  • true if WebP format