#include <GDIPlus.au3>
Dim $File_Background = '' ;Pfad zur Hintergrunddatei
Dim $File_Transparent = '' ;Pfad für Transparente Datei für den Vordergrund
Dim $Draw_BackgroundFile = True ;Hintergrundbild oder nur Farbe zeichnen
$drawGUI = GUICreate('GUI zum zeichnen', 1280, 720)
GUISetState() ;im fertigen Script ist die GUI dann nicht sichtbar 
$hGui = GUICreate('sichtbare GUI', 500, 300)
GUISetState()
_GDIPlus_Startup()
$hgraphics = _GDIPlus_GraphicsCreateFromHWND($drawGUI)
$hgraphics_hGui = _GDIPlus_GraphicsCreateFromHWND($hGui)
$Image_Picture = _GDIPlus_ImageLoadFromFile($File_Transparent)
$Image_Background = _GDIPlus_ImageLoadFromFile($File_Background)
$hBrush = _GDIPlus_BrushCreateSolid(0xff00ff00)
If $Draw_BackgroundFile = True Then
_GDIPlus_GraphicsDrawImageRect($hgraphics, $Image_Background, 0, 0, 1280, 720)
Else
_GDIPlus_GraphicsFillRect($hgraphics,0,0,1280,720,$hBrush)
EndIf
_GDIPlus_GraphicsDrawImageRect($hgraphics,$Image_Picture,0,0,1280,720)
_GDIPlus_GraphicsDrawString($hgraphics, 'Test String',10,10,'Arial',100)
_GDIPlus_GraphicsDrawImageRect($hgraphics_hGui, $hgraphics, 50,50,400,400/16*9) ; nun alles auf die sichtbare GUI zeichnen
$hBitmap=_GDIPlus_BitmapCreateFromGraphics(1280,720,$hgraphics)
_GDIPlus_ImageSaveToFile($hBitmap,@ScriptDir&'\Test.jpg')
_GDIPlus_GraphicsDispose($Image_Picture)
_GDIPlus_GraphicsDispose($Image_Background)
_GDIPlus_GraphicsDispose($hgraphics)
_GDIPlus_GraphicsDispose($hgraphics_hGui)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_Shutdown()
Sleep(2500)