Thread: bitblt mask

  1. #1
    Registered User
    Join Date
    Jul 2004

    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?


  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    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
    Replies: 7
    Last Post: 05-16-2003, 10:19 PM
  4. bitblt
    By canine in forum Windows Programming
    Replies: 3
    Last Post: 07-10-2002, 12:17 AM
  5. Replies: 3
    Last Post: 12-15-2001, 01:46 PM