Advertisement

Colorkeying not working properly

Started by July 31, 2000 08:07 AM
0 comments, last by epic709 24 years, 3 months ago
I don''t know why this is happening but when I blit a 64x128 bitmap from my offscreen surface to the backbuffer, I get the following result: It gets weirder b''coz when my bitmap was initially 64x64, there was no offending black line. Black (RGB 0,0,0) is my colorkey btw. I even checked in Photoshop to see if I had accidentally left a non-pure black line on the bitmap but there was no such thing. Then I thought maybe I had scaled the image by mistake when blitting but my source rect''s dimensions are same as the destination''s. I''m baffled at this point. Anybody know what could be wrong here? Why is there a black line that shows on screen when it should have been colorkeyed out? Observing closely, I noticed the line was not continuous - it starts at the top, goes down until it meets the edge of the flowerbed, leaves a few pixels for the flowerbed''s edge, then continues to the bottom. Plain weird.
nice gfx btw.

For some really, REALLY, strange reason with direct x and my machine... If my resolution is 32bits, I''m rendering to a window, my bltted surface is in offscreenplain, the surface has a colorkey, and I have only created surfaces the first time for the application:

I get lines just as you are describing throughout my whole color keyed area (thus not on the flowers) that are the color exactly as my color key. I was getting lines every four pixels on a 32x32 surface. It''s really weird, if I destroy and re-create the surfaces using the exact same functions within the same program thread the lines disappear.

My problem is unexplainable. To get around this, I created all surfaces in systemmemory. btw, for comparison I have an ATI Rage Pro Turbo 2x AGP onboard. Are you using the Win32 API? I think it might have to do with the LoadImage function because I never tried my own loading routines.
___________________________Freeware development:ruinedsoft.com

This topic is closed to new replies.

Advertisement