Mun Posted December 22, 2012 Posted December 22, 2012 Can autoit capable of attaching a header (create on the fly or attach another .jpg header) to an image and output result like this?
Xandy Posted December 22, 2012 Posted December 22, 2012 (edited) I'd do it with AutoIt and SDL. GDI is good too, but I don't know GDI. There is probably a better solution. You could load a surface variable with bmp file data, maybe jpg will work for you, I use bmp to do the editing then make a jpg out of the final image. Then load your header into a surface, draw the header on the first surface, then save the first surface to bmp. You could draw your header surface with alpha gradient lines with a function or editor. Edited December 22, 2012 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
UEZ Posted December 22, 2012 Posted December 22, 2012 (edited) Yes, it is possible with GDI+.You can use this function to create it:Func _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2, $iWrapMode = 0) Local $tPointF1, $pPointF1 Local $tPointF2, $pPointF2 Local $aResult $tPointF1 = DllStructCreate("float;float") $pPointF1 = DllStructGetPtr($tPointF1) $tPointF2 = DllStructCreate("float;float") $pPointF2 = DllStructGetPtr($tPointF2) DllStructSetData($tPointF1, 1, $nX1) DllStructSetData($tPointF1, 2, $nY1) DllStructSetData($tPointF2, 1, $nX2) DllStructSetData($tPointF2, 2, $nY2) $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iWrapMode, "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[6] EndFunc ;==>_GDIPlus_LineBrushCreateThis function returns a brush handle which can be used with _GDIPlus_GraphicsFillRect() function to create the header you want.Br,UEZ Edited December 22, 2012 by UEZ Xandy and Mun 2 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Mun Posted December 23, 2012 Author Posted December 23, 2012 UEZ Thank you for pointing me to the right direction. It's work perfectly.
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