public static WebPImage createFromNativeMemory(
      long nativePtr, int sizeInBytes, @Nullable ImageDecodeOptions options) {
    ensure();
    Preconditions.checkArgument(nativePtr != 0);
    WebPImage image = nativeCreateFromNativeMemory(nativePtr, sizeInBytes);
    if (options != null) {
      image.mDecodeBitmapConfig = options.animatedBitmapConfig;
    }
    return image;
  }
Creates a {@link WebPImage} from a ByteBuffer containing the image. This will throw if it fails
to create.

@param byteBuffer the ByteBuffer containing the image
animated-webp/src/main/java/com/facebook/animated/webp/WebPImage.java