View Single Post
Old November 12, 2020, 03:06   #1
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 52
Posts: 427
Tibarius is an unknown quantity at this point
using Shockbolt's tiles

Testing graphics with shockbolt's tiles.
Using the 64x64.png tile file i try to copy them into a screen device using
C++ with bloodshed IDE (not sure which compiler is used right now) on a Windows 10 machine.

I am using the Win32 GDI API BitBlt function to copy a source bitmap into
a screen destination.

Works fine so far. Just the graphics in the .png file have white background pixel (FF FF FF). Is there an easy way to copy a 64x64 pixel extract into a destination screen bitmap but have the white pixels in the source getting ignored?

I tried ... filling destination bitmap with WHITE pixels and then use BitBlt with the copy mode of SRCINVERT ... doing an exclusive or operation.

And indeed this turns all white pixels into black (empty) pixels. But also the color codes are inverted and the graphics turn into "shadows".

Anyone have an good idea? Please reply, thanks!
__________________
Blondes are more fun!
Tibarius is offline   Reply With Quote