【发布时间】:2017-10-19 15:30:33
【问题描述】:
我在下面有这段代码来打印位图图像,但我不想打印手柄的全尺寸。打印后是否可以只打印正方形或裁剪位图图像?我正在使用 AutoIt。
这是我第一次发问题,如有错误请见谅。
$hDDC = _WinAPI_GetDC($hWnd)
$hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iWidth, $iHeight)
$hCDC = _WinAPI_CreateCompatibleDC($hDDC)
_WinAPI_SelectObject($hCDC, $hBMP)
DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "hwnd", $hCDC, "int", 0)
_WinAPI_DeleteDC($hCDC)
_WinAPI_ReleaseDC($hWnd, $hDDC)
【问题讨论】:
-
你研究过图像魔法吗?看到这个帖子:autoitscript.com/forum/topic/58361-image-editor-imagemagick