Aaron3569 Posted February 9, 2023 Share Posted February 9, 2023 Hello! does anyone knows a way to keep the alpha channel after converting a HBITMAP to BITMAP using BitmapCreateFromHBITMAP. I have read something about using LockBits but i would love to know if there are other ways to do this. Link to comment Share on other sites More sharing options...
genius257 Posted February 9, 2023 Share Posted February 9, 2023 (edited) Hi @Aaron3569. In the docs for _GDIPlus_BitmapCreateHBITMAPFromBitmap the second argument is the background color that should support the alpha channel. So try this: _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap , 0x00000000) You did not provide example code for me to try the solution with, and I'm not feeling like making code to test this solution with currently, but it SHOULD work Hope it helps! Edit: I just realized you wanted to use _GDIPlus_BitmapCreateFromHBITMAP instead, my bad . I have some code that does this, so if you provide some example code to demonstrate the issue, I'll take the time to dig through my archive of files If not, there are solutions if you search enough within this forum 😅. Edited February 9, 2023 by genius257 Me being an idiot and not initially reading the question right Aaron3569 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now