Message-ID: <34B825B4.3079@compuserve.com> Date: Sat, 10 Jan 1998 20:51:48 -0500 From: Laurent Turcotte MIME-Version: 1.0 Subject: Re: Extracting a pixel from an Allegro BITMAP References: <19980109085201 DOT DAA02949 AT ladder02 DOT news DOT aol DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Newsgroups: comp.os.msdos.djgpp Lines: 34 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi For a bitmap buffer BITMAP buffer; pixel = buffer.line[y][x] the line element of the BITMAP structure contain pointers to start of lines (a lookup table) So there are no multiplications involved . Regards Laurent Turcotte > Hello everybody... > > in the past... my buffers have been char * > > I could simply do: > > a_pixel = double_buffer[(y<<8) + (y<<6) + (x>>2)]; > > - or - > > double_buffer [(y<<8) + (y<<6) + (x>>2)] = a_pixel; > > - and even - > > a_pixel = image->buffer[(y<<8) + (y<<6) + (x>>2)]; > .. and the other way around.... > > How can I do that with an Allegro BITMAP? > ...