B
blipadeebling
Guest
hello im a long time reader, but just newly registered.
im working on an editor for the PC TEX files that are used within both FF7 and FF8, but am having trouble with 16-bit images. i read that the each pixel is in a 16-bit RGB555 format, but still the pictures display weird (the right shape is there, but the colours are all wrong).
My method of extracting the colour data was:
im working on an editor for the PC TEX files that are used within both FF7 and FF8, but am having trouble with 16-bit images. i read that the each pixel is in a 16-bit RGB555 format, but still the pictures display weird (the right shape is there, but the colours are all wrong).
My method of extracting the colour data was:
- Reading two-bytes for each pixel
- Ommiting the first bit as it is the unused/alpha bit
- Reading the first 5-bits as the red-color
- Reading the next 5-bits as the green-color
- Reading the remaining 5-bits as the blue-color (essentially treating as a ARGB format)
Code: [Select]But yeah ive been stuck on this all morning and im not sure whats wrong with this as i looked up docs on the RGB555 format, and what they have stated is how ive approached it. Could any body tell me the exact format of the 16-bit colour data, and the method it is supposed to be read. Any help is appreciated.Code:r = (red / 31) * 255;g = (green / 31) * 255;b = (blue / 31) * 255;