#include <GDIPlus.au3>
Text2PNG(@DesktopDir & "\MyPNG.png", 0x00FFFFFF) ; Transparent but bold ugly text
;Text2PNG(@DesktopDir & "\MyPNG.png", 0xFFFFFFFF) ; Nice Text but not transparent
Func Text2PNG($sFile, $iColor)
_GDIPlus_Startup()
Local $hImage = _GDIPlus_BitmapCreateFromScan0(50, 25)
Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage)
_GDIPlus_GraphicsClear($hGraphics, $iColor)
_GDIPlus_GraphicsDrawString($hGraphics, "Hello", 0, 0, "Arial", 12, 0)
_GDIPlus_ImageSaveToFile($hImage, $sFile)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_BitmapDispose($hImage)
_GDIPlus_Shutdown()
EndFunc ;==>Text2PNG
Hello ladys and gentlemen,
I have this piece of code and it does what it's supposed to do.
I want to use it to create an image sequence with frame/image information for compositing overlay.
However, when i use a transparent background the text starts to look kinda bold or fat.
I dont know what causes this ugly effect.
Is there a way to avoid this effect somehow?
Thanks!