LOULOU Posted November 26, 2007 Share Posted November 26, 2007 I ind to tra,sform a capture in 16 colors greyscale but it seems that someone is not working #include <GDIPLUS.au3> #include <ScreenCapture.au3> _GDIPlus_Startup() ; Get JPEG encoder CLSID $sCLSID = _GDIPlus_EncodersGetCLSID ("JPEG") $hBitmap = _ScreenCapture_Capture ("") $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap) $tData = DllStructCreate("int Data") DllStructSetData($tData, "Data",$GDIP_PXF16GRAYSCALE ) $tParams = _GDIPlus_ParamInit (1) _GDIPlus_ParamAdd ($tParams, $GDIP_EPGCOLORDEPTH , 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Data")) ; Save bitmap to file _GDIPlus_ImageSaveToFileEx ($hImage, @desktopdir& "\GDIPlus_Image2.jpg", $sCLSID,DllStructGetPtr($tParams)) ; Clean up resources ; _GDIPlus_ImageDispose ($hClone) _GDIPlus_ImageDispose ($hImage) _WinAPI_DeleteObject ($hBitmap) ; Shut down GDI+ library _GDIPlus_ShutDown () What is wrong Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now