Mail Archives: djgpp/1998/06/18/08:30:21
From: | gah AT jet DOT es (Grzegorz Adam Hankiewicz)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: [Allegro] Primitive bitmap access in datafiles
|
Date: | Thu, 18 Jun 1998 12:27:33 GMT
|
Organization: | Gogosoftware
|
Lines: | 15
|
Message-ID: | <3589075a.3703286@news.jet.es>
|
References: | <6mb0kf$u1c$1 AT news DOT wave DOT co DOT nz>
|
NNTP-Posting-Host: | info163.jet.es
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On Fri, 19 Jun 1998 00:22:36 +1200, "Question" <surfer AT -nospam- DOT net>
wrote:
>How do you access individual pixels of a bitmap that is embedded in a
>datafile.
>e.g.
>If the "images[1].dat" pointed to the data in a datafile,
>and using an 8bit (256 colour) depth,
>how would you get the colour of the pixel at say x=5, y=3?
I think you only need a cast. Say:
color = ((BITMAP *) images[1].dat) -> line[3][5];
- Grzegorz Adam Hankiewicz - gah AT jet DOT es - http://web.jet.es/gregorio/
- Gogosoftware - http://welcome.to/gogosoftware/
- Raw text -