Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exporting 16bit BMP
#2
(04-15-2022, 09:15 PM)bilbo Wrote: I am using GIMP 2.10 on a Macbook Pro OSX 12.3.1. When I try to export a 16 bit XCF file as a 16 bit BMP R5G6R5 file, I wind uo with an 8 bit BMP file.

First of all it is a matter of definition and convention.

A Gimp 16 bit precision is 16 bits for each channel = 16 red + 16 green + 16 blue = total 48 bits

The bmp advanced option 16 bits 565 format is 5 red + 6 green + 5 blue = total 16 bits

Confusing, well that is the way it is Wink

Why does Gimp open the 565 (16 bits) bmp as 8 bit (8 red + 8 green + 8 blue = 24 bits) Gimp is a RGB editor and will edit in that format. Want to keep the 565 bmp, then export again in that format.

How can you tell if Gimp is exporting as a 565 bmp ? There is no real way, the utilities I use will identify as 8 bit same as at the top of the Gimp window. One way, since bmp is (usually) uncompressed is compare file size. For an example image:
A precision 16 bit (48 bits) uncompressed = 700 KB
A regular 8 bit (24 bits) bmp = 360 KB
A 565 (16 bits) bmp = 240 KB - Less information / smaller file size.

You might notice a difference with the 565 (16) bit bmp open in Gimp. The reduced color information can be seen in gradients where banding will occur. If you hope to improve gradients by using Gimp 16 bit precision, you are out of luck. 

Other ways of getting a 565 bmp ? There is command line ffmpeg (you can get a macos version)

Code:
ffmpeg -vcodec png -i 565.png -vcodec rawvideo -f rawvideo -pix_fmt rgb565 565.raw

You can check that in Gimp, opening as raw data. Set the size and image type. You will still edit as 8 bit RGB.

   

Is this for a Game engine ? You would have to try the raw file and see.
Reply


Messages In This Thread
Exporting 16bit BMP - by bilbo - 04-15-2022, 09:15 PM
RE: Exporting 16bit BMP - by rich2005 - 04-16-2022, 09:31 AM
RE: Exporting 16bit BMP - by programmer_ceds - 04-16-2022, 04:05 PM
RE: Exporting 16bit BMP - by bilbo - 04-16-2022, 01:37 PM
RE: Exporting 16bit BMP - by rich2005 - 04-16-2022, 03:35 PM
RE: Exporting 16bit BMP - by bilbo - 04-16-2022, 06:44 PM
RE: Exporting 16bit BMP - by programmer_ceds - 04-16-2022, 07:28 PM

Forum Jump: