Drago del Fato
Member
I'm trying to make a program which will load those XYZ image file formats. Here's the information I currently have on this format but it's hard to understand. I hope somebody will have a clarification of this.
So far I can read the header easily. I can decompress the data with zlib. But when I try to make an image (for instance the ASCII logo) the letters go to the side and the colors are all not right.
I am converting red, green and blue using this formulae: (r OR (g SHIFT LEFT 8) OR (b SHIFT LEFT 16))
Can anybody explain how these series of colors in rgb order are stored in the file, and ultimately can anyone show me how to load this file normally at all.
Thank you for help.
RM2k XYZ Graphics Format
Simple documentation file v1.0 by Janus (janusfury@citlink.net)
Header:
4 bytes: XYZ1
2 bytes, unsigned int: Width
2 bytes, unsigned int: Height
Data:
ZLib-compressed. Use ZLib.dll uncompress to decompress it...
The output size of the data is (image and palette):
(Width * Height) + (256 * 3)
The input size of the data is:
FileSize - 8
In english, the data starts after the header and ends at the end of the file, and the image, when decompressed, is just a palette and then image data.
The palette is simply a series of colors in RGB order, no 4th byte for the palette entries.
The data is just a bunch of palette indexes, in standard x,y order.
So far I can read the header easily. I can decompress the data with zlib. But when I try to make an image (for instance the ASCII logo) the letters go to the side and the colors are all not right.
I am converting red, green and blue using this formulae: (r OR (g SHIFT LEFT 8) OR (b SHIFT LEFT 16))
Can anybody explain how these series of colors in rgb order are stored in the file, and ultimately can anyone show me how to load this file normally at all.
Thank you for help.