byte[] dataBuf1 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf1, width, height, 32); return new Image(Format.ABGR8, width, height, data1, null, com.jme3.texture.image.ColorSpace.sRGB); case BufferedImage.TYPE_3BYTE_BGR: // most common in JPEG images byte[] dataBuf2 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf2, width, height, 24); return new Image(Format.BGR8, width, height, data2, null, com.jme3.texture.image.ColorSpace.sRGB); case BufferedImage.TYPE_BYTE_GRAY: // grayscale fonts byte[] dataBuf3 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf3, width, height, 8);
byte[] dataBuf1 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf1, width, height, 32); return new Image(Format.ABGR8, width, height, data1); case BufferedImage.TYPE_3BYTE_BGR: // most common in JPEG images byte[] dataBuf2 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf2, width, height, 24); return new Image(Format.BGR8, width, height, data2); case BufferedImage.TYPE_BYTE_GRAY: // grayscale fonts byte[] dataBuf3 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf3, width, height, 8); return new Image(Format.Luminance8, width, height, data3); case BufferedImage.TYPE_USHORT_GRAY: // grayscale heightmap short[] dataBuf4 = (short[]) extractImageData(img); if (flipY) flipImage(dataBuf4, width, height, 16);
byte[] dataBuf1 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf1, width, height, 32); return new Image(Format.ABGR8, width, height, data1, null, com.jme3.texture.image.ColorSpace.sRGB); case BufferedImage.TYPE_3BYTE_BGR: // most common in JPEG images byte[] dataBuf2 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf2, width, height, 24); return new Image(Format.BGR8, width, height, data2, null, com.jme3.texture.image.ColorSpace.sRGB); case BufferedImage.TYPE_BYTE_GRAY: // grayscale fonts byte[] dataBuf3 = (byte[]) extractImageData(img); if (flipY) flipImage(dataBuf3, width, height, 8);