开发者

Combine two images in c#

开发者 https://www.devze.com 2023-02-03 03:37 出处:网络
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#

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

精彩评论

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

关注公众号