Skip to content

Commit

Permalink
Add comment about GdipCreateHBITMAPFromBitmap preserving transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
iseahound committed Feb 1, 2022
1 parent c06080f commit ffc1f25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ImagePut (for v1).ahk
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ class ImagePut {

put_hBitmap(pBitmap, alpha := "") {
; Revert to built in functionality if a replacement color is declared.
if (alpha != "") { ; This built-in version is about 25% slower.
if (alpha != "") { ; This built-in version is about 25% slower and also preserves transparency.
DllCall("gdiplus\GdipCreateHBITMAPFromBitmap", "ptr", pBitmap, "ptr*", hbm:=0, "uint", alpha)
return hbm
}
Expand Down
2 changes: 1 addition & 1 deletion ImagePut.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,7 @@ class ImagePut {

static put_hBitmap(pBitmap, alpha := "") {
; Revert to built in functionality if a replacement color is declared.
if (alpha != "") { ; This built-in version is about 25% slower.
if (alpha != "") { ; This built-in version is about 25% slower and also preserves transparency.
DllCall("gdiplus\GdipCreateHBITMAPFromBitmap", "ptr", pBitmap, "ptr*", &hbm:=0, "uint", alpha)
return hbm
}
Expand Down

0 comments on commit ffc1f25

Please sign in to comment.