Results 1 to 15 of 15

Thread: Alpha Blending (Resolved & Updated)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Wisconsin
    Posts
    64

    Post Alpha Blending (Resolved & Updated)

    I was looking for a way to alpha blend a form (translucency, ie see-tru, not transparency) but was unable to find actual code that I thought worthy; so I made my own. It's kind of slow (calculating and drawing 38,912 pixels (152x256) takes an average of 3,305+-13ms using the Point method of 2 source PictureBoxes and 1 destination PictureBox) but it gives the desired effect. It's like stitching two images together. Attatched is my sample program that I am working on. It allows you to choose two source images (.bmp's) and create a third alpha blended picture with adjustable transparency. As I mentioned before, the code works good, but somewhat slowly (without drawing it takes 1,370+-2ms for 38,912 pixels (152x256) using the Point method). Take a look and tell me what you think.

    Another reason for this test is because I have WinME and I can't use SetLayeredWindowAttributes. This code does not make the form translucent but it is a step in the right direction (I feel). I am also wondering if using GetBitmapBits and SetBitmapBits could cut down the calculation and drawing times. If you come up with any improvements, please let me know so I can utilize them and improve my process.

    PS - If you do reply, do not e-mail me. My Hotmail Junk Filter is on exclusive (no one in my Contacts or Safe List gets to my Inbox) and Immediate Deletion (anything going to go to my Junk Mail folder is immediately deleted) so I will not recieve your e-mail. Either post a reply or send a Private Message.

    Attatchment deleted
    Last edited by lnelsestuen; Nov 6th, 2002 at 01:47 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width