From ffc1f25a29c337fb3fc8dab1aeafe66589c1081c Mon Sep 17 00:00:00 2001 From: Edison Hua Date: Tue, 1 Feb 2022 14:24:27 -0500 Subject: [PATCH] Add comment about GdipCreateHBITMAPFromBitmap preserving transparency --- ImagePut (for v1).ahk | 2 +- ImagePut.ahk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ImagePut (for v1).ahk b/ImagePut (for v1).ahk index ddbf314e..913f1c8b 100644 --- a/ImagePut (for v1).ahk +++ b/ImagePut (for v1).ahk @@ -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 } diff --git a/ImagePut.ahk b/ImagePut.ahk index 07ce5752..d9dc4530 100644 --- a/ImagePut.ahk +++ b/ImagePut.ahk @@ -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 }