Tolf Posted July 31, 2008 Posted July 31, 2008 (edited) Hi In my script, I have to create an image with GDI+ and I do this :Func CreateImage($width, $height, ByRef $h_image, ByRef $h_graphic) Local $hwndtemp = GUICreate("", $width, $height) $h_bitmap = _ScreenCapture_CaptureWnd("", $hwndtemp, 0, 0, $width, $height) $h_image = _GDIPlus_BitmapCreateFromHBITMAP($h_bitmap) $h_graphic = _GDIPlus_ImageGetGraphicsContext($h_image) _GDIPlus_GraphicsClear($h_graphic, 0xFFFFFFFF) GUIDelete($hwndtemp) EndFunc...but I think it is not the best way to create an image (using a window ). So how can I create my image without using a window ? Thank you for answering ! Edited July 31, 2008 by Tolf My UDF : Array2D
Zedna Posted August 1, 2008 Posted August 1, 2008 (edited) _WinAPI_CreateBitmap() Func CreateImage($width, $height, ByRef $h_image, ByRef $h_graphic) $h_bitmap = _WinAPI_CreateBitmap($width, $height) $h_image = _GDIPlus_BitmapCreateFromHBITMAP($h_bitmap) $h_graphic = _GDIPlus_ImageGetGraphicsContext($h_image) _GDIPlus_GraphicsClear($h_graphic, 0xFFFFFFFF) EndFunc Edited August 1, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Tolf Posted August 1, 2008 Author Posted August 1, 2008 Thx I didn't search in WinAPI My UDF : Array2D
Zedna Posted August 1, 2008 Posted August 1, 2008 ThxI didn't search in WinAPIWinAPI includes also standard GDI functions (not GDI+) Resources UDF ResourcesEx UDF AutoIt Forum Search
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