1. Need some help understanding get_pixel() results
- Posted by dstanger at belco.bc.ca Jul 03, 2001
- 352 views
Hello all, Some of you may have noticed my posts where I am working on scanning a bitmap using get_pixel(). Well, I am using a solid blue bitmap as a test subject and get_pixel() is returning color number 4 which is red, isn't it? What is going on here? Thank you, David S.
2. Re: Need some help understanding get_pixel() results
- Posted by euman at bellsouth.net Jul 03, 2001
- 348 views
have you used all_palette? what graphics mode are you useing? You might want to check out this program > Palette Management Utilities Colin Taylor 1/24/99 It has some powerfull code to help you in DOS get around that DOS palette problem your haveing. You could send me some code and Ill help you figure it out.. Euman euman at bellsouth.net ----- Original Message ----- From: <dstanger at belco.bc.ca> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, July 04, 2001 00:44 Subject: Need some help understanding get_pixel() results > > > Hello all, > > Some of you may have noticed my posts where I am working on scanning a > bitmap using get_pixel(). Well, I am using a solid blue bitmap as a test > subject and get_pixel() is returning color number 4 which is red, isn't it? > What is going on here? > > Thank you, > David S. > > > > >
3. Re: Need some help understanding get_pixel() results
- Posted by irvm at ellijay.com Jul 04, 2001
- 349 views
----- Original Message ----- From: <dstanger at belco.bc.ca> > Hello all, > > Some of you may have noticed my posts where I am working on scanning a > bitmap using get_pixel(). Well, I am using a solid blue bitmap as a test > subject and get_pixel() is returning color number 4 which is red, isn't it? Not necessarily. Color 4 can be just about any color you want it to be. Same applies to color 1,2, ....12... etc. The color number is just an index into the palette, which is an array of color values. Thinks of it as color[4] . Depending upon the graphics mode (2, 16, 256 colors, for example) the palette array will have more or less entries. Try looking at the palette sequence, and changing it. You'll see the colors cycle. A long time ago, I had a small program that would display all the colors DOS provides in a given mode, and let you modify them and save the new palette, to be used 'instead' of the palette which loads with the bitmap. You'll run into further problems with this also: if you try to use more than one bitmap on screen at one time, there's a good chance that loading the second bitmap will screw up the colors of the first (because you are over-writing the palette entries) You'll need to 'normalize' the palettes. A tool like PaintShop Pro can help here. If you need further info on that part, let me know. Regareds, Irv