开发者

Image Processing In c#,.net

I want to create a small application that allows me to insert an image on top of another image.And also i want to insert some text as well.

So can someone points me out where to start.Is there any open source libraries that allows 开发者_开发技巧me to do this task?.

I am after a solution that can be implemented in C#,Visual Studio .net.

Thanks.


You need to use the Graphics class.

For example:

using(var oldImage = Bitmap.FromFile(path))
using(var newImage = new Bitmap(250, 250))
using(var graphics = Graphics.FromImage(newImage)) {
    graphics.DrawImage(oldImage, 10, 15);
    graphics.DrawString("Hello, world!", SystemFonts.DefaultFont, Brushes.Red, 0, 0);
    newImage.Save(path);
}


Try ImageMagick.Net. Lotsa stuff in there.


You should be OK using System.Drawing.Graphics if you don't need anything too fancy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜