public class

WebpUtil

extends Object
java.lang.Object
   ↳ com.facebook.imageutils.WebpUtil

Class Overview

This class contains utility method in order to manage the WebP format metadata

Summary

Public Methods
static int get2BytesAsInt(InputStream is)
static Pair<Integer, Integer> getSize(InputStream is)
This method checks for the dimension of the WebP image from the given InputStream.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static int get2BytesAsInt (InputStream is)

Throws
IOException

public static Pair<Integer, Integer> getSize (InputStream is)

This method checks for the dimension of the WebP image from the given InputStream. We don't support mark/reset and the Stream is always closed.

Parameters
is The InputStream used for read WebP data
Returns
  • The Size of the WebP image if any or null if the size is not available