From: gregorio AT jet DOT es (Grzegorz Adam Hankiewicz) Newsgroups: comp.os.msdos.djgpp Subject: Re: Extracting a pixel from an Allegro BITMAP Date: Fri, 09 Jan 1998 12:57:38 GMT Organization: Gogosoftware Lines: 21 Message-ID: <34b61e19.6803419@news.jet.es> References: <19980109085201 DOT DAA02949 AT ladder02 DOT news DOT aol DOT com> NNTP-Posting-Host: infon308.jet.es To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > a_pixel = double_buffer[(y<<8) + (y<<6) + (x>>2)]; > - or - > double_buffer [(y<<8) + (y<<6) + (x>>2)] = a_pixel; > > How can I do that with an Allegro BITMAP? Try this: a_pixel=bitmap->line[y][x]; or bitmap->line[y][x]=a_pixel; This only works if bitmap is a memory bitmap, not a svga screen or something like that. Read in the Allegro documentation the section "Direct access to video memory" for more information about accessing the memory and bitmap structures. - Grzegorz Adam Hankiewicz - gregorio AT jet DOT es - http://web.jet.es/gregorio - Gogosoftware - http://web.jet.es/gregorio/gogosoftware