Jump to content

Displaying a transparent PNG programatically


Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted
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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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