Jump to content
News about the LabVIEW Wiki! Read more... ×
Neil Pate

Displaying a transparent PNG programatically

Recommended Posts

I have a customer logo, a PNG with a transparent background and I wish to programatically display it on a FP which also happens to have a picture (static) pasted into the background. I have tried to use a native 2D picture control and also a .net Picturebox but cannot get the logo displaying nicely with proper transparency.

This is all a bit deja-vu for me as I struggled with a similar issue some years ago however none of those techniques seemed to do the trick now. All the forum posts seem to indicate this is quite a tricky thing to get right.

Any ideas?

Share this post


Link to post
Share on other sites
57 minutes ago, Antoine Chalons said:

just thinking out loud, have you tried to use BitMan toolkit to merge the 2 images in one and then display it?

Wow, I'm surprised anyone here remembers this rusty tool :)

Yes, it should do the job. It is available here: http://sine.ni.com/nips/cds/view/p/lang/pl/nid/209830

Check out clock.vi example

clock.png

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for the suggestions; I have used BitMan in the past to do some image scaling. However in this case I am not sure it is going to help me as my background image is "static" i.e. pasted into the FP background.

Share this post


Link to post
Share on other sites

Check out Channel Operations.vi example then :)

2.png

Edited by vugie
  • Like 2

Share this post


Link to post
Share on other sites

Where have you been all my life?  Seriously though in all the various posts I've made with my "Image Manipulation" code (another thread on LAVA) which leverages .Net and the PictureBox allowing for alpha layer images, and combining layers of alpha images.  In none of these threads has BitMan ever been mentioned.  I even have used my Image Manipulation code in other projects like the Toolbar Class for things like button overlays on mouse over, but still didn't know this existed.  I think somethings probably have better performance on .Net like resizing, but still I likely wouldn't have dove into developing that code if I knew this existed.  Oh and the added benefit of being able to have controls on top, or below the image (which PictureBox can't) is awesome.

Share this post


Link to post
Share on other sites
10 minutes ago, hooovahh said:

Where have you been all my life? 

Sorry, I'm not very often here for last few years. Even less on the dark side...

Share this post


Link to post
Share on other sites

Seriously vugie, BitMan is a fantastic library.

Share this post


Link to post
Share on other sites

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

×

Important Information

By using this site, you agree to our Terms of Use.