Wie wäre es damit?
Spoiler anzeigen
#include <GDIPlus.au3>
[/autoit] [autoit][/autoit] [autoit]Global $sPath_Image = @ScriptDir & "\Input.jpg"
Global $sPath_Save = @ScriptDir & "\Output.png"
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]OnAutoItExitRegister("_Shutdown")
_AddInfoBar($sPath_Save, $sPath_Image, "Text2666699", "AutoIt Rocks!", 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 10, 12, 40)
Func _AddInfoBar($sSavePath, $sImagePath, $sString1, $sString2, $iColor_Square, $iColor1 = 0xFF000000, $iColor2 = 0xFF000000, $iSize1 = 12, $iSize2 = 12, $iInfoBar_Height = 40)
Local $hImage, $hBitmap, $hGraphics, $iImage_Width, $iImage_Height, $hBrush_White, $hBrush_Square, $hBrush_String1, $hBrush_String2
Local $hPen_Square, $hFontFamily, $hFont1, $hFont2, $hStringFormat, $tRect_Layout1, $tRect_Layout2
$hImage = _GDIPlus_ImageLoadFromFile($sImagePath)
[/autoit] [autoit][/autoit] [autoit]$iImage_Width = _GDIPlus_ImageGetWidth($hImage)
$iImage_Height = _GDIPlus_ImageGetHeight($hImage)
$hBitmap = _GDIPlus_BitmapCreateFromScan0($iImage_Width, $iImage_Height + $iInfoBar_Height)
$hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetTextRenderingHint($hGraphics, 5)
$hBrush_White = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
$hBrush_Square = _GDIPlus_BrushCreateSolid($iColor_Square)
$hPen_Square = _GDIPlus_PenCreate(0xFF000000, 1)
$hBrush_String1 = _GDIPlus_BrushCreateSolid($iColor1)
$hBrush_String2 = _GDIPlus_BrushCreateSolid($iColor2)
$hFontFamily = _GDIPlus_FontFamilyCreate("Segoe UI")
$hFont1 = _GDIPlus_FontCreate($hFontFamily, $iSize1)
$hFont2 = _GDIPlus_FontCreate($hFontFamily, $iSize2)
$tRect_Layout1 = _GDIPlus_RectFCreate($iImage_Width * 0.05, $iImage_Height, $iImage_Width * 0.35, $iInfoBar_Height)
$tRect_Layout2 = _GDIPlus_RectFCreate($iImage_Width * 0.40, $iImage_Height, $iImage_Width * 0.35, $iInfoBar_Height)
$hStringFormat = _GDIPlus_StringFormatCreate()
_GDIPlus_StringFormatSetAlign($hStringFormat, 1)
_GDIPlus_StringFormatSetLineAlign($hStringFormat, 1)
_GDIPlus_GraphicsClear($hGraphics)
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hImage, 0, 0, $iImage_Width, $iImage_Height)
_GDIPlus_GraphicsFillRect($hGraphics, 0, $iImage_Height, $iImage_Width, $iInfoBar_Height, $hBrush_White)
_GDIPlus_GraphicsSetSmoothingMode($hGraphics, 2)
_GDIPlus_GraphicsDrawStringEx($hGraphics, $sString1, $hFont1, $tRect_Layout1, $hStringFormat, $hBrush_String1)
_GDIPlus_GraphicsDrawStringEx($hGraphics, $sString2, $hFont2, $tRect_Layout2, $hStringFormat, $hBrush_String2)
_GDIPlus_GraphicsFillRect($hGraphics, $iImage_Width * 0.8, $iImage_Height + $iInfoBar_Height * 0.3, $iInfoBar_Height * 0.4, $iInfoBar_Height * 0.4, $hBrush_Square)
_GDIPlus_GraphicsDrawRect($hGraphics, $iImage_Width * 0.8, $iImage_Height + $iInfoBar_Height * 0.3, $iInfoBar_Height * 0.4, $iInfoBar_Height * 0.4, $hPen_Square)
_GDIPlus_ImageSaveToFile($hBitmap, $sSavePath)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_BrushDispose($hBrush_Square)
_GDIPlus_BrushDispose($hBrush_String1)
_GDIPlus_BrushDispose($hBrush_String2)
_GDIPlus_BrushDispose($hBrush_White)
_GDIPlus_PenDispose($hPen_Square)
_GDIPlus_FontDispose($hFont1)
_GDIPlus_FontDispose($hFont2)
_GDIPlus_FontFamilyDispose($hFontFamily)
_GDIPlus_StringFormatDispose($hStringFormat)
Return True
EndFunc
Func _Shutdown()
_GDIPlus_Shutdown()
EndFunc