@Override
    public @NotNull BufferedImage read(int imageIndex, ImageReadParam param) throws IOException {
      loadInfoIfNeeded();
      if (myError == 0) throw new IOException(UNABLE_TO_READ_WEBP_IMAGE);
      assert myInputBytes != null;
      byte[] argb = libwebp.WebPDecodeARGB(myInputBytes, myInputBytes.length, myWidthOut, myHeightOut);
      @SuppressWarnings("UndesirableClassUsage")
      BufferedImage bi = new BufferedImage(myWidthOut[0], myHeightOut[0], BufferedImage.TYPE_INT_ARGB);
      // Copy the bytes read above to the image's data buffer.
      final int[] a = ((DataBufferInt) bi.getRaster().getDataBuffer()).getData();
      IntBuffer intBuf = ByteBuffer.wrap(argb).asIntBuffer();
      if (a.length != intBuf.remaining()) throw new IOException(UNABLE_TO_READ_WEBP_IMAGE);
      intBuf.get(a);
      return bi;
    }
@Override
    public @NotNull BufferedImage read(int imageIndex, ImageReadParam param)