风景还好说(只要没有太阳或其它圆形参照物),直接拉伸修改至你需要的尺寸,再添加图片及文字。#include <GDIPlus.au3>
_PicChangeSize('1.jpg', '2.jpg', 1024, 768)
Func _PicChangeSize($sFile, $sFile_new, $new_W, $new_H)
_GDIPlus_Startup()
Local $hImage = _GDIPlus_ImageLoadFromFile($sFile)
Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage)
Local $hBmp = _GDIPlus_BitmapCreateFromGraphics($new_W, $new_H, $hGraphics)
Local $hImage_New = _GDIPlus_ImageGetGraphicsContext($hBmp)
_GDIPlus_GraphicsDrawImageRect($hImage_New, $hImage, 0, 0, $new_W, $new_H)
_GDIPlus_ImageSaveToFile($hBmp, $sFile_new)
_GDIPlus_GraphicsDispose($hImage_New)
_GDIPlus_BitmapDispose($hBmp)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
EndFunc ;==>_PicChangeSize
|