#include <GDIPlus.au3>
#include <WinAPI.au3>
_GDIPlus_Startup()
$hBitmap = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\player_skin.bmp")
$hclone = _GDIPlus_BitmapCloneArea($hBitmap, 0, 0, _GDIPlus_ImageGetWidth($hBitmap), _GDIPlus_ImageGetHeight($hBitmap))
$hGraphic = _GDIPlus_ImageGetGraphicsContext($hclone)
;$hGraphic1 = _GDIPlus_GraphicsCreateFromHDC(_WinAPI_CreateCompatibleDC(0))
$hHBITMAP1 = _WinAPI_CreateBitmap(_GDIPlus_ImageGetWidth($hBitmap), _GDIPlus_ImageGetHeight($hBitmap), 1, 32)
$hCDC = _WinAPI_CreateCompatibleDC(0)
$hOld = _WinAPI_SelectObject($hCDC, $hHBITMAP1)
$hGraphic1 = _GDIPlus_GraphicsCreateFromHDC($hCDC)
_GDIPlus_GraphicsClear($hGraphic1, 0x00000000)
DllCall("msimg32.dll", "BOOL", "TransparentBlt", "hwnd", $hGraphic1, "int", 0, "int", 0, "int", _GDIPlus_ImageGetWidth($hBitmap), "int", _GDIPlus_ImageGetHeight($hBitmap), _
"hwnd", $hGraphic, "int", 0, "int", 0, "int", _GDIPlus_ImageGetWidth($hBitmap), "int", _GDIPlus_ImageGetHeight($hBitmap), "UINT", "RGB(255,0,255)")
;~ DllCall("gdi32.dll", "BOOL", "BitBlt", "hwnd", $hGraphic2, "int", 0, "int", 0, "int", _GDIPlus_ImageGetWidth($hBitmap), "int", _GDIPlus_ImageGetHeight($hBitmap), _
;~ "hwnd", $hGraphic1, "int", 0, "int", 0, "dword", "SRCCOPY")
_GDIPlus_ImageSaveToFile($hHBITMAP1, @ScriptDir & "\111.bmp")
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hGraphic1)
_GDIPlus_ImageDispose($hclone)
_WinAPI_DeleteObject($hBitmap)
_GDIPlus_Shutdown()