The header of the format will look like this
G9B_ID DB "G9B"
G9B_BIT_DEPTH DB 0 ; 2,4,8 or 16
G9B_COLOR_TYPE DB 0
G9B_WIDTH DW 0
G9B_HEIGHT DW 0
G9B_COMPRESSION DB 0
G9B_DATA_SIZE DS 3,0 ; 24 bit file size
G9B_NR_COLORS DB 0 ; Number of colors in palette mode
Anyone something to add?
Well, I prefer 4-byte ID's, but that's just me, perhaps.
It probably is or do you have a good reason for it?
I prefer PNG files
They even have 4 byte ID's too
Gheh, well, just that whenever I want to make a file format with an ID, 4 characters usually is usually the best fit for the description .
Uh... FM-PAC also has two 4-byte ID's... (PAC2 and OPLL)... Gheh... ^_^
~Grauw
Yes, but PNG files, they're just not do-able. Mainly because of one reason: it doesn't support 15-bit RGB, the spec says in that case it has to be converted to 24-bit RGB and the compression will take care of the space waste. However I don't think either mandatory compression or ultra-large files are an option .
I was kidding about the PNG.. mentioned it mainly because of the IRC discussion yesterday (or was it this morning ^^
Anyway... a PNG viewer for MSX is still very much needed..
Well, 'very much' would be a bit exaggerated... Anyways, it shouldn't be hard to make.
~Grauw
Dude, I'd kill for a PNG viewer/convertor.
Then I finally wouldn't have to work with crappy BMP or GIF anymore...
Well, make it then... it's just a matter of a gzip decompressor iirc, of which sources should be easy to find, reading out some headers, and shifting some bits of the 8-bit colour channels into 5-bit... You could accept only 24-bits bitmaps.
~Grauw