private Image createImage(int nbSlices, int byteBuffersSize, Image.Format imgFormat, int pixelWidth, int pixelHeight, int depth) {
        ArrayList<ByteBuffer> imageData = new ArrayList<>(nbSlices);
        for (int i = 0; i < nbSlices; i++) {
            imageData.add(BufferUtils.createByteBuffer(byteBuffersSize));
        }
        Image image = new Image(imgFormat, pixelWidth, pixelHeight, depth, imageData, ColorSpace.sRGB);
        return image;
    }
Create an image with given parameters
@param nbSlices
@param byteBuffersSize
@param imgFormat
@param pixelWidth
@param pixelHeight
@param depth
@return
jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXLoader.java