public static GifImage createFromByteArray(byte[] source) {
    Preconditions.checkNotNull(source);

    ByteBuffer byteBuffer = ByteBuffer.allocateDirect(source.length);
    byteBuffer.put(source);
    byteBuffer.rewind();

    return createFromByteBuffer(byteBuffer, ImageDecodeOptions.defaults());
  }
Creates a {@link GifImage} from the specified encoded data. This will throw if it fails to
create. This is meant to be called on a worker thread.

@param source the data to the image (a copy will be made)
animated-gif/src/main/java/com/facebook/animated/gif/GifImage.java