开发者

.net image editing algorithms

I want a .net (or native) code that will be able to add开发者_JAVA百科 a soft borders to an image.

For example:

Initial image

.net image editing algorithms

Image after transformation:

.net image editing algorithms

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.


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


Check out ImageMagick.

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜