docs: public static ByteBuffer getImageData(int[] pixels, Format format, int width, int height) {
          final ByteBuffer data = CausticUtil.createByteBuffer(width * height * format.getComponentCount());
          for (int y = height - 1; y >= 0; y--) {
              for (int x = 0; x < width; x++) {
                  final int pixel = pixels[x + y * width];
                  if (format.hasRed()) {
                      data.put((byte) (pixel >> 16 & 0xff));
                  }
                  if (format.hasGreen()) {
                      data.put((byte) (pixel >> 8 & 0xff));
                  }
                  if (format.hasBlue()) {
                      data.put((byte) (pixel & 0xff));
                  }
                  if (format.hasAlpha()) {
                      data.put((byte) (pixel >> 24 & 0xff));
                  }
              }
          }
          data.flip();
          return data;
      }