#include <GDIPlus.au3>
Local $fPicBk = '1.jpg' ;底图
Local $fPicAdd = '2.jpg' ;添加小图
Local $aPosAdd = [0, 0, 200, 150] ;添加小图的坐标及大小
Local $fPicSave = '合成.jpg'
_GDIPlus_Startup()
Local $hImage_Bk = _GDIPlus_ImageLoadFromFile($fPicBk)
Local $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage_Bk)
Local $hImage_add = _GDIPlus_ImageLoadFromFile($fPicAdd)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage_add, $aPosAdd[0], $aPosAdd[1], $aPosAdd[2], $aPosAdd[3])
_GDIPlus_ImageSaveToFile($hImage_Bk, $fPicSave)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($hImage_Bk)
_GDIPlus_ImageDispose($hImage_add)
_GDIPlus_Shutdown()
|