From: "Martin Sodoma" Newsgroups: comp.os.msdos.djgpp,rec.games.programmer,comp.graphics.algorithms Subject: Re: Palette Conversion Date: 7 Jul 1997 19:21:00 GMT Organization: Intimate Arts Lines: 27 Message-ID: <01bc8b0a$e64756a0$46a8b3c1@bbs.infima.cz> References: <33c070c8 DOT 0 AT duster DOT adelaide DOT on DOT net> NNTP-Posting-Host: bbs.infima.cz To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Microsoft Palette format (PhotoShop can load it) *.pal typedef struct { char lpchRiff[4]; DWORD dwFileSize; char lpchPalette[8]; DWORD dwPaletteSize; WORD wVersion; WORD wNumEntries; } PALETTEFILEHEADER; PALETTEFILEHEADER plfh; CHECK these information: if (strncmp(plfh.lpchRiff, "RIFF", 4)) goto ERROR: if (strncmp(plfh.lpchPalette, "PAL data", 8)) goto ERROR: if (HIBYTE(plfh.wVersion) != 3) goto ERROR: THEN LOAD PALETTEENTRY array which is this size: dwSize = (plfh.wNumEntries) * sizeof(PALETTEENTRY); Maybe it helps. Martin