int col = new Color(red, green, blue).getRGB();
for(int i = 0; i < len; i++)
pixelData[getRealPixelPosition(currentPixel++, height, width)] = col;
} else {
for(int i = 0; i < len; i++) {
int blue = is.readByte() & 0xFF;
int green = is.readByte() & 0xFF;
int red = is.readByte() & 0xFF;
int col = new Color(red, green, blue).getRGB();
pixelData[getRealPixelPosition(currentPixel++, height, width)] = col;
}