Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. HBITMAP with alpha channel - what's wrong?

HBITMAP with alpha channel - what's wrong?

Scheduled Pinned Locked Moved C / C++ / MFC
graphicswinformsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Don Rolando
    wrote on last edited by
    #1

    Hi everyone, I have a HBITMAP with alpha channel information. The alpha channel should already be premultiplied. Nevertheless, when using GDI's AlphaBlend(..) function, the bitmap seems to have "black borders", means the semi-transparent areas are simply black. Does this mean I am doing something wrong? Or is AlphaBlend that limited? I guess I should avoid legacy GDI AlphaBlend, maybe some has a clue what alternatives I'd have for a dialog based application? Is there something better in GDI+ for bitmaps with transparency? I am not really convinced to go for D2D for this bitmap only. ;-) Cheers, Don Rolando

    D 1 Reply Last reply
    0
    • D Don Rolando

      Hi everyone, I have a HBITMAP with alpha channel information. The alpha channel should already be premultiplied. Nevertheless, when using GDI's AlphaBlend(..) function, the bitmap seems to have "black borders", means the semi-transparent areas are simply black. Does this mean I am doing something wrong? Or is AlphaBlend that limited? I guess I should avoid legacy GDI AlphaBlend, maybe some has a clue what alternatives I'd have for a dialog based application? Is there something better in GDI+ for bitmaps with transparency? I am not really convinced to go for D2D for this bitmap only. ;-) Cheers, Don Rolando

      D Offline
      D Offline
      daoxwj
      wrote on last edited by
      #2

      I think GDI+ will be better for bitmap to transplant

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups