Knowledgebase Home | Contact Knowledgebase Home| Contact
Search the Knowledgebase Browse by Category
How do I set a Bitmap Color to transparent?
User Opinions
60% thumbs up 40% thumbs down

How would you rate this answer?
Helpful
Not helpful
To set a color in a bitmap to transparent, insert a Math module between the data input module and the OrthoImage output module with the Math Output Type set to the same as the image ("Unsigned 8 bits" for examples that I used) and Expression[4] set to the following:

If A1 = R and A2 = G and A3 = B, 0, A4

where

A1 is the red value R.
A2 is the green value G.
A3 is the blue value B.
A4 is the alpha value or opacity.
Values range from 0 to 255.
Black is (0,0,0) and white is (255,255,255).
An opacity of 0 is fully transparent and 255 is fully opaque.

One image that I tested has white values that are not "pure" with a B value of 247, so it is important to verify the RGB values in a graphics package like Photoshop or Paint Shop Pro. You can use > and < to indicate a range of values.

IF A1 > 225 and A2 > 230 and A3 > 240, 0, A4

The alternate Boolean syntax is also valid:

A1 > 225 and A2 > 230 and A3 > 240? 0: A4

If the image colors change to gray instead of transparent, change the Math module Output Type from the default "Float (32 bits) to "Unsigned 8 bits".

If the colors do not display as transparent, right-click in the Viewer window and change the Transparency Type from the default "Blend" to another method like "Delayed Blend". The setting that works best will depend on the type of objects you have displayed.

Visitor Comments
No visitor comments posted. Post a comment
Related Questions
Attachments
No attachments were found.
Post Comment for "How do I set a Bitmap Color to transparent?"
To post a comment for this question, simply complete the form below. Fields marked with an asterisk are required.
   Name:
   Email:
* Comment:
Continue
Powered by ActiveKB Knowledgebase Software

Home * Products * Gallery * Support * About Us * Register * Order * Demos