From: "Pavlos" Newsgroups: comp.os.msdos.djgpp Subject: Re: BMP file : how to load and set the palette WHITOUT using any library Date: Tue, 13 Jul 1999 05:38:57 +0300 Organization: An OTEnet S.A. customer Lines: 22 Message-ID: <7me8qu$rog$1@newssrv.otenet.gr> References: <37866EC2 DOT D137FDC4 AT club-internet DOT fr> <7m8qsv$dc6$1 AT newssrv DOT otenet DOT gr> <378A5B47 DOT D1D56A26 AT club-internet DOT fr> NNTP-Posting-Host: dram-a16.otenet.gr X-Trace: newssrv.otenet.gr 931833502 28432 195.167.113.239 (13 Jul 1999 02:38:22 GMT) X-Complaints-To: abuse AT otenet DOT gr NNTP-Posting-Date: 13 Jul 1999 02:38:22 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >Tanks for your help, since my last message i have found how to load the palette, >for those >who are interrested , here's the complete source code for a 256 color (8bits) >320*200 picture using djgpp 2.0 > >if someone could explain me why did this : >for(y=4;y>b->width%4;y--) fgetc(fp); is needed if the picture weight can't be >divide by 4 ??? >that's the only thing i don't understand in this code. > >Domi. > I think that the size (in bytes) of a row in a BMP file has to be multiple of 4. So, if your bitmap's width is 6, each row will take 8 bytes instead of six. Pavlos