Windows Colors & palette help needed 
Author Message
 Windows Colors & palette help needed

Dr D. Tetard

I have a problem using colors under Windows with BP 7.0.

I have bitmaps in my resource file with 256 colors.
Windows 3.11 on my computer is configured to use 256 colors in
800x600.

But, I try to transfer these bitmaps into a memory DC then to a screen
DC (using various rasters operations to create sprite effects (keep
the backgroud colors while displaying a graphic uppon it)).
I can't recover on my screen the colors used in the resource bitmap.
Is it only a problem with my 'and', 'or', 'xor' raster operation (so I
have to check again and again my code) or do I have to consider
defining palettes colors and try to make it works. Trying with using a
palette with only one or two missing colors doesn't seem to work
thought.

If anyone already encountered such a problem and has a clue for
solving it, please reply, by e-mail if possible (my connection to
newsgroup is quite randomly successful).

Thanks a lot.

David.



Wed, 18 Jun 1902 08:00:00 GMT  
 Windows Colors & palette help needed

Quote:

> Dr D. Tetard

> I have a problem using colors under Windows with BP 7.0.

> I have bitmaps in my resource file with 256 colors.
> Windows 3.11 on my computer is configured to use 256 colors in
> 800x600.

> But, I try to transfer these bitmaps into a memory DC then to a screen
> DC (using various rasters operations to create sprite effects (keep
> the backgroud colors while displaying a graphic uppon it)).
> I can't recover on my screen the colors used in the resource bitmap.
> Is it only a problem with my 'and', 'or', 'xor' raster operation (so I
> have to check again and again my code) or do I have to consider
> defining palettes colors and try to make it works. Trying with using a
> palette with only one or two missing colors doesn't seem to work
> thought.

> If anyone already encountered such a problem and has a clue for
> solving it, please reply, by e-mail if possible (my connection to
> newsgroup is quite randomly successful).

> Thanks a lot.

> David.

First, you of course must select a palette into every dc you use along
the way. The next problem is that for thoses raster ops to work
correctly, all the bitmaps must have the same exact palette.
You may want to consider using device independent bitmaps, and
combine the bits yourself.

Joe
--
Joe C. Hecht
(Borland Delphi Developer Support)
Join the Delphi Online Discussion Forum at
http://www.borland.com/techsupport/delphi/



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Windows Pascal 1.5 - Text color & Background color

2. Windows Pascal 1.5 - Text color & Background color

3. Please Help Me with 256 color Palette !!

4. RGB and 256-color palette matching

5. RGB 256-color palette problem

6. 256 color palette

7. 256 color palette in TP7

8. Rotating color palette.

9. Changing Palette in high color mode

10. - 256 Color Palette Blues

11. Lousy Palette - help, help, help, help, help...

12. Windows/bitmaps/palette

 

 
Powered by phpBB® Forum Software