Ich versuche mich gerade GDI+ bekannt zu machen. Allerdings habe ich ein wenig Schwierigkeiten mit dem Speichern von einem Bild:
Spoiler anzeigen
#include <GDIplus.au3>
#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 326, 248, 192, 124)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_GDIPlus_Startup()
global $pen=_GDIPlus_PenCreate(0xFFFF0000,2)
global $gra=_GDIPlus_GraphicsCreateFromHWND($Form1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
es()
EndSwitch
_GDIPlus_GraphicsDrawLine($gra,1,1,100,10,$pen)
sleep(50)
WEnd
func es()
_GDIPlus_GraphicsDrawLine($gra,1,1,100,10,$pen)
$ima=_GDIPlus_BitmapCreateFromGraphics(100,10,$gra)
_GDIPlus_ImageSaveToFile($ima,@ScriptDir&"\a.bmp")
_GDIPlus_PenDispose($pen)
_GDIPlus_GraphicsDispose($gra)
_GDIPlus_BitmapDispose($ima)
_GDIPlus_Shutdown()
exit
EndFunc
Wäre schön wenn mir jemand sagen könnte, warum dass Bild nur aus Schwarz besteht.