From: noah AT cloud9 DOT net (Noah Levenson) Newsgroups: comp.os.msdos.djgpp Subject: pixel scanning in Allegro? Date: Thu, 23 Jan 1997 03:36:00 GMT Organization: Cloud 9 Internet, White Plains, NY, USA Lines: 19 Message-ID: <5c6bse$qeo@news.cloud9.net> Reply-To: noah AT cloud9 DOT net NNTP-Posting-Host: noah.dialup.cloud9.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I'm using Allegro with DJGPP and I want to "scan" a certain number of pixels from a 2d pcx file. The first thing I thought of was to use the getpixel function, but this doesn't work. All I need to do is get the color (number in the pallete, I guess) of a pixel at x,y on the 2d image. I _thought_ that by assigning the output of the getpixel function to an integer variable, I could do this. I wrote a simple progarm to load a pcx and set the pallete, (that part works, I've tested it) and assign the integer from getpixel to a variable "pixeldata". The program then used printf to write the integer to the screen. When I compile, I get a warning that says "passing arg 1 of 'printf' makes pointer of integer without a cast". It DOES output something, but it is a short string of nonesense ascii characters. What is going on? An email response would be preferable. Thanks so much. Noah Levenson noah AT cloud9 DOT net