使用System.drawing命名空间在asp.net中裁剪tiff图像的代码 [英] Code to crop the tiff image in asp.net using System.drawing namespace
本文介绍了使用System.drawing命名空间在asp.net中裁剪tiff图像的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我需要在我的应用程序中裁剪tiff(标记图像文件格式)图像的代码
使用名称空间System.Drawing.
我用Google搜索,但没有找到正确的主意.
请任何人提供代码以裁剪tiff图像.
问候,
Raj
Dear All,
I need the code to crop the tiff(Tagged Image File format) image in my application
using the namespace System.Drawing.
I googled for it, but not getting the proper idea.
Please any one give the code to crop the tiff image.
Regards,
Raj
推荐答案
尝试:
Image i = Image.FromFile(@"F:\Temp\MyPic.tif");
Image cropped = new Bitmap(200, 200);
Graphics g = Graphics.FromImage(cropped);
Rectangle dest = new Rectangle(new Point(0, 0), cropped.Size);
Rectangle source = new Rectangle(new Point(100,100), cropped.Size);
g.DrawImage(i, dest, source, GraphicsUnit.Pixel);
g.Dispose();
进行以下讨论:裁剪图像使用C# [ ^ ]
Go through this discussion: Cropping a Image Using C#[^]
这篇关于使用System.drawing命名空间在asp.net中裁剪tiff图像的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文