Tutorial :Image Processing In c#,.net



Question:

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.


Solution:1

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);  }  


Solution:2

Try ImageMagick.Net. Lotsa stuff in there.


Solution:3

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »