以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]请问ft有切割或截取或合并图片档尺寸功能吗?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=146430)

--  作者:Aman
--  发布时间:2020/2/23 22:04:00
--  [求助]请问ft有切割或截取或合并图片档尺寸功能吗?
如题
--  作者:有点蓝
--  发布时间:2020/2/23 23:09:00
--  
如裁剪

Dim file As String = "E:\\问题\\123.png"
Dim img As Image = getimage(file)
Dim bmpOut As new Bitmap(290, 185, PixelFormat.Format24bppRgb) \'290为裁剪区域宽度,185为高度
Dim myGraphics As Graphics = Graphics.FromImage(bmpOut)
myGraphics.Clear(Color.White)
myGraphics.DrawImage(img, new Rectangle(0, 0, 290, 185), new Rectangle(270, 100, 290, 185), GraphicsUnit.Pixel) \'270为原图需要裁剪的区域的左边距,100为上边距
myGraphics.Dispose()
bmpOut.Save("E:\\问题\\123_1.png")

合并的话,定义足够大的Bitmap,把2张图片绘制到合适的位置即可

--  作者:Aman
--  发布时间:2020/2/24 6:01:00
--  
谢谢,我试试看.