VB 2005 - Compositing Operations (C.O.)

  • 14 years ago

    Hello Community!

    I'm quite new in VB (just since November06) and I'm looking for a fast way to overlap greyscale bitmaps in VB2005 (i.e. for every pixel R=G=B). I tryed to use the alpha-blending tchnique but it doesn't fit my porpouses (after I perform the C. O. the overlapping region is darkned).
    I would like the overlapping process to be a lightening process (the resultant color is always at least as light as either of the two costituent colors). In particular overlapping any color with white should produce white. Overlapping any color with black should leave the original color unchanged.
    I found an interesting program in VB6 that seems to to that
     http://www.vbaccelerator.com/home/VB/Code/vbMedia/Image_Processing/Compositing/article.asp


    It implements 24 standard C.O. (Porter-Duff C. O.) and it includes a ready-to-run .exe demo to see what they actually do (the "screen" C.O. seems to perform my task, if you want to have a look..).
    Unfortunatly I'm working in VB2005 and I'm not able to convert the code (I tryed with some "conversion-programs" already). I could try to completley re-write it but I just a beginner and the VB6 sorce code seems complicated.

    If anyone already came to a similar problem could please help me?

    Thanx, see you! : )

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout