bitblt mask

This is a discussion on bitblt mask within the Windows Programming forums, part of the Platform Specific Boards category; I have been using masks to generate transparent areas of bitmaps for some time now, but I have just hit ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    24

    bitblt mask

    I have been using masks to generate transparent areas of bitmaps for some time now, but I have just hit a problem.
    In the mask, the black represents the transparent section and white represents the opaque sections, and in the actuall image black represents transparency all the rest is blited to the screen. What if I want to a make part of an image transparent but some of the image I want to display is black, to it just keeps getting recognised as a transparent section?
    in other words, how can I invert what colors represent transparent/opaque?

    thanks

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    The masks and the original images have nothing to do with one another. What I mean is that you can have black on your actual image and use white to mark it as an area to be drawn on the mask.

    Ok now on to your actual question, you can do a BitBlt() with the SRCINVERT or DSTINVERT flags in order to invert your mask image.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. inotify woes
    By quixote in forum Linux Programming
    Replies: 6
    Last Post: 01-26-2008, 01:58 AM
  2. bit shifting a mask
    By detfella in forum C++ Programming
    Replies: 1
    Last Post: 02-25-2004, 05:13 PM
  3. C diamonds and perls :)
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 05-16-2003, 11:19 PM
  4. bitblt
    By canine in forum Windows Programming
    Replies: 3
    Last Post: 07-10-2002, 01:17 AM
  5. Replies: 3
    Last Post: 12-15-2001, 01:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21