public interface

WebpBitmapFactory

com.facebook.common.webp.WebpBitmapFactory
Known Indirect Subclasses

Class Overview

Interface for a bitmap factory that can decode WebP images even on versions of Android that don't support it.

Implementation is found in the optional static-webp library. To use, add the following to your build.gradle file: compile 'com.facebook.fresco:static-webp:${FRESCO_VERSION}'

Summary

Nested Classes
interface WebpBitmapFactory.WebpErrorLogger We listen to events in Webp direct decoding  
Public Methods
abstract Bitmap decodeByteArray(byte[] array, int offset, int length, BitmapFactory.Options opts)
abstract Bitmap decodeFile(String pathName, BitmapFactory.Options opts)
abstract Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, BitmapFactory.Options opts)
abstract Bitmap decodeStream(InputStream inputStream, Rect outPadding, BitmapFactory.Options opts)
abstract void setBitmapCreator(BitmapCreator bitmapCreator)
Set the object which should create the bg Bitmap
abstract void setWebpErrorLogger(WebpBitmapFactory.WebpErrorLogger logger)
Register the given listener as observer of error

Public Methods

public abstract Bitmap decodeByteArray (byte[] array, int offset, int length, BitmapFactory.Options opts)

public abstract Bitmap decodeFile (String pathName, BitmapFactory.Options opts)

public abstract Bitmap decodeFileDescriptor (FileDescriptor fd, Rect outPadding, BitmapFactory.Options opts)

public abstract Bitmap decodeStream (InputStream inputStream, Rect outPadding, BitmapFactory.Options opts)

public abstract void setBitmapCreator (BitmapCreator bitmapCreator)

Set the object which should create the bg Bitmap

Parameters
bitmapCreator The BitmapCreator implementation

public abstract void setWebpErrorLogger (WebpBitmapFactory.WebpErrorLogger logger)

Register the given listener as observer of error

Parameters
logger The WebpErrorLogger in order to observe webp errors