@Override
    public int readPixels(int pixelWidth, int pixelHeight, byte[] pixelData, ByteBuffer buffer, DataInput in) throws IOException {
        int pixelRead = 0;
        for (int row = 0; row < pixelHeight; row++) {
            for (int pixel = 0; pixel < pixelWidth; pixel++) {
                in.readFully(pixelData);
                buffer.put(pixelData);
                pixelRead += pixelData.length;
            }
        }
        return pixelRead;
    }
reads the pixels of an image whose origin is the bottom left corner

@author Nehon
jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/SrTuRoPixelReader.java