Package com.batch.android.messaging.gif
Class GifHelper
- java.lang.Object
-
- com.batch.android.messaging.gif.GifHelper
-
public class GifHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intNEEDED_BYTES_FOR_TYPE_CHECK
-
Constructor Summary
Constructors Constructor Description GifHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GifDrawablegetDrawableForBytes(android.content.Context context, byte[] data, boolean start)Get aGifDrawablefor the given byte arraystatic booleanisPotentiallyAGif(int[] data)Returns whether the data represents a GIF
-
-
-
Field Detail
-
NEEDED_BYTES_FOR_TYPE_CHECK
public static final int NEEDED_BYTES_FOR_TYPE_CHECK
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPotentiallyAGif
public static boolean isPotentiallyAGif(@NonNull int[] data)Returns whether the data represents a GIFOnly the first 6 bytes are needed
-
getDrawableForBytes
public static GifDrawable getDrawableForBytes(@NonNull android.content.Context context, @NonNull byte[] data, boolean start)
Get aGifDrawablefor the given byte arrayIt is assumed that the byte array has been checked with
isPotentiallyAGif(int[])
-
-