Stretchblt causing funky colors 
Author Message
 Stretchblt causing funky colors

I wrote a program that does some graphics (remeber concentration/memory,
where you try to find the matching tiles...) it does this using strechblt
and bitblt. Everything works fine on my computer here at work, and on mine
at home (Both Win98SE). I made a copy and gave it to my brother-in-law and
on his computer (Win98 - NOT SE) the colors are all messed up when the game
runs, it almost looks as though you are
looking at a photo with only 256 colors. I had tried this game on Windows
2000 and figured it was an incompatiblity with 2000, but it seems that even
though he has Windows98 (which is what I have and tested it on) it doesn't
display right. Does anyone have any ideas what might be causing it and what
I can do to fix the problem. I want to customize it and give it to my
nephews for Christmas, but I don't want it to look totally tweaked when they
play it.

All the code for the program can be found at
http://www.*-*-*.com/
The graphics placement (using strechblt) is done in the 'clsGraphic' class.
It should be fairly easy to follow.

Help please if you can, and thanks.

Brian Wallace



Sat, 07 Jun 2003 08:03:42 GMT  
 Stretchblt causing funky colors
You probably have to set the StretchBltMode to HALFTONE before you start
StretchBlting
your pictures.
http://kpdteam.tripod.com/api/SetStretchBltMode.htm

Regards,
Pieter Philippaerts
http://www.allapi.net/



Quote:
> I wrote a program that does some graphics (remeber concentration/memory,
> where you try to find the matching tiles...) it does this using strechblt
> and bitblt. Everything works fine on my computer here at work, and on mine
> at home (Both Win98SE). I made a copy and gave it to my brother-in-law and
> on his computer (Win98 - NOT SE) the colors are all messed up when the
game
> runs, it almost looks as though you are
> looking at a photo with only 256 colors. I had tried this game on Windows
> 2000 and figured it was an incompatiblity with 2000, but it seems that
even
> though he has Windows98 (which is what I have and tested it on) it doesn't
> display right. Does anyone have any ideas what might be causing it and
what
> I can do to fix the problem. I want to customize it and give it to my
> nephews for Christmas, but I don't want it to look totally tweaked when
they
> play it.

> All the code for the program can be found at
> http://206.207.152.222/downloads/memory.zip
> The graphics placement (using strechblt) is done in the 'clsGraphic'
class.
> It should be fairly easy to follow.

> Help please if you can, and thanks.

> Brian Wallace




Sat, 07 Jun 2003 09:26:26 GMT  
 Stretchblt causing funky colors
That didn't seem to make a difference when I ran it under Win2000 (where I
also experience the problem). It doesn't look exactly like it is being done
in 256, but the it is pretty close. Any other suggestions? Remember the
exact same program works splendly under Windows98 Second Edition.


Quote:
> You probably have to set the StretchBltMode to HALFTONE before you start
> StretchBlting
> your pictures.
> http://kpdteam.tripod.com/api/SetStretchBltMode.htm

> Regards,
> Pieter Philippaerts
> http://www.allapi.net/



> > I wrote a program that does some graphics (remeber concentration/memory,
> > where you try to find the matching tiles...) it does this using
strechblt
> > and bitblt. Everything works fine on my computer here at work, and on
mine
> > at home (Both Win98SE). I made a copy and gave it to my brother-in-law
and
> > on his computer (Win98 - NOT SE) the colors are all messed up when the
> game
> > runs, it almost looks as though you are
> > looking at a photo with only 256 colors. I had tried this game on
Windows
> > 2000 and figured it was an incompatiblity with 2000, but it seems that
> even
> > though he has Windows98 (which is what I have and tested it on) it
doesn't
> > display right. Does anyone have any ideas what might be causing it and
> what
> > I can do to fix the problem. I want to customize it and give it to my
> > nephews for Christmas, but I don't want it to look totally tweaked when
> they
> > play it.

> > All the code for the program can be found at
> > http://206.207.152.222/downloads/memory.zip
> > The graphics placement (using strechblt) is done in the 'clsGraphic'
> class.
> > It should be fairly easy to follow.

> > Help please if you can, and thanks.

> > Brian Wallace




Sun, 08 Jun 2003 02:38:27 GMT  
 Stretchblt causing funky colors
Just to let you know, I went and incorporated your suggestion and I was
orginally wrong, this does solve the problem. Thanks,

Brian


Quote:
> You probably have to set the StretchBltMode to HALFTONE before you start
> StretchBlting
> your pictures.
> http://kpdteam.tripod.com/api/SetStretchBltMode.htm

> Regards,
> Pieter Philippaerts
> http://www.allapi.net/



> > I wrote a program that does some graphics (remeber concentration/memory,
> > where you try to find the matching tiles...) it does this using
strechblt
> > and bitblt. Everything works fine on my computer here at work, and on
mine
> > at home (Both Win98SE). I made a copy and gave it to my brother-in-law
and
> > on his computer (Win98 - NOT SE) the colors are all messed up when the
> game
> > runs, it almost looks as though you are
> > looking at a photo with only 256 colors. I had tried this game on
Windows
> > 2000 and figured it was an incompatiblity with 2000, but it seems that
> even
> > though he has Windows98 (which is what I have and tested it on) it
doesn't
> > display right. Does anyone have any ideas what might be causing it and
> what
> > I can do to fix the problem. I want to customize it and give it to my
> > nephews for Christmas, but I don't want it to look totally tweaked when
> they
> > play it.

> > All the code for the program can be found at
> > http://206.207.152.222/downloads/memory.zip
> > The graphics placement (using strechblt) is done in the 'clsGraphic'
> class.
> > It should be fairly easy to follow.

> > Help please if you can, and thanks.

> > Brian Wallace




Mon, 09 Jun 2003 06:23:30 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. StretchBlt and 256 colors

2. Distorted colors with stretchblt

3. Distorted colors with stretchblt

4. Use of BitBlt causing different results depending on color depth

5. FUNKY VB/ACCESS PROBLEM

6. Funky Problem

7. ComboBox and Null values = Funky

8. funky ADO.NET Error

9. funky old Xenix basic

10. Little funky program I just wrote

11. funky window shaping

12. Funky val() operation.

 

 
Powered by phpBB® Forum Software