本帖最后由 yxiany 于 2009-10-13 13:40 编辑
我用汉化版的也试了一下,还是不能产生黑白图片.我把我源码发给你,你别改,看看能生成黑白图片吗!生成的图片文件在D盘根目录下.谢谢!#include <GDIPlus.au3>
#include <ScreenCapture.au3>
Opt('MustDeclareVars', 1)
_Main()
Func _Main()
Local $hBitmap, $hClone, $hImage, $iX, $iY
; Initialize GDI+ library
_GDIPlus_StartUp ()
; Capture 32 bit bitmap
$hBitmap = _ScreenCapture_Capture ("")
$hImage = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap)
; Create 24 bit bitmap clone
$iX = _GDIPlus_ImageGetWidth ($hImage)
$iY = _GDIPlus_ImageGetHeight ($hImage)
$hClone = _GDIPlus_BitmapCloneArea ($hImage, 0, 0, $iX, $iY, $GDIP_PXF01INDEXED);$GDIP_PXF01INDEXED $GDIP_PXF24RGB
; Save bitmap to file
_GDIPlus_ImageSaveToFile ($hClone, "D:\GDIPlus_Image.bmp")
; Clean up resources
_GDIPlus_ImageDispose ($hClone)
_GDIPlus_ImageDispose ($hImage)
_WinAPI_DeleteObject ($hBitmap)
; Shut down GDI+ library
_GDIPlus_ShutDown ()
EndFunc ;==>_Main
|