开发者

Combine two images in c#

I want to create an image by combining two images so that first image is set as border of开发者_Go百科 second image using c# code.


Please check out this articles on combining images in C#

Just change it to work with two images, and manipulate the offset so one borders the other.


Disclaimer: I work at Atalasoft

Our DotImage Photo SDK (which is free) can do this.

Load an image

AtalaImage img = new AtalaImage("file.jpg");

Load the border (assumes that it has tranparent in the middle, and is the same size)

OverlayCommand cmd = new OverlayCommand("border.png", new Point(0,0));
AtalaImage borderedImg = cmd.Apply(img).Image;

Save the final image

borderedImg.Save("final.jpg", new JpegEncoder(), null);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜