Maxim V. Pavlov
Maxim V. Pavlov

Reputation: 10509

.net image editing algorithms

I want a .net (or native) code that will be able to add a soft borders to an image.

For example:

Initial image

Image after transformation:

I did it with Word 2010, but I am sure there is a C++ or .net lib that does the same.

If you are familiar with some code that can do this, please let me know.

Thank you.

Upvotes: 0

Views: 99

Answers (2)

Guffa
Guffa

Reputation: 700562

The simplest way is to create an image that fades from white to transparent, and just draw that on top of the image. Like:

using (Bitmap b = (Bitmap)Image.FromFile("frame.png")) {
  using (Graphics g = Graphics.FromImage(theImage)) {
    g.DrawImage(b, 0, 0, theImage.Width, theImage.Height);
  }
}

Upvotes: 1

Brandon Moretz
Brandon Moretz

Reputation: 7631

Check out ImageMagick.

http://www.imagemagick.org/index.html

Upvotes: 0

Related Questions