De-Masking Images

Blitz3D Forums/Blitz3D Beginners Area/De-Masking Images

BlackD(Posted 2004) [#1]
Is there any way to prevent Blitz3D automatically masking images with 0,0,0 for transparency. I'm loading a bunch of images which USE 0,0,0 as a colour, and re-masking them all with 255,0,255 just to undo what its done in the first place seems kinda a waste of cycles. :)

+BlackD


BlackD(Posted 2004) [#2]
And I can't afford to be generous.. I've only got 1.9 billion of those cycle-thingee's per second. ;)


WendellM(Posted 2004) [#3]
MaskImage handle,red,green,blue

Parameters
handle=the variable you assigned the handle to when you loaded the image.
red=the red color value (0-255)
green=the green color value (0-255)
blue=the blue color value (0-255)

Description
Blitz Basic assumes that when you load an image (using LoadImage or LoadAnimImage) for drawing (using DrawImage command), you want the color black (RGB color 0,0,0) on your image to be transparent (or see through). There WILL come a time when you want some other color to be that masked color. This command will let you set that mask color using the color's RGB values


BlackD(Posted 2004) [#4]
Yeah, I know how to change the mask to a different color.. I was just wondering if I can stop it masking it in the first place, or set the default mask to a different color.

At the moment, to load an image with black pixels, I have to use two commands for EVERY image, first of all LOADIMAGE then MASKIMAGE. It seems pointless to MASKIMAGE just to remove a mask that blitz put on there by itself.


Matty(Posted 2004) [#5]
If you don't want to use a mask then simply draw the image with drawblock not drawimage.


darklordz(Posted 2004) [#6]
Take a look @ my static data loader tuto in the tutorials forum. It displayes the use of types. by storing all the images in types you can cycle trough them and apply the masking colors @ once....