Jump to content
David Schwartz

TImage Transparency question

Recommended Posts

Posted (edited)

I have a small PNG that contains a signature sample, usually black on a white background.

 

I do some processing on it and take a histogram to find the most frequent color (presumably the BG color) then set it as the transparent color, and assign it to another TImage.

 

Unfortunately, it's still black on a white background.

 

I want a way to see that it's actually transparent. Eg, if there's a checkbox and you toggle it, the background switches from white to, say, a checkerboard pattern.

 

How do I set up the checkerboard pattern (or whatever), then how do I "overlay" the transparent image on it?

Edited by David Schwartz

Share this post


Link to post

Put the PNG TImage on top of another TImage, or a TPanel, or whatever you want, that has the desired background image.

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×