我想将图片与覆盖图一起保存,在我的情况下,它是整个图片的简单线条。当我保存此图像时,它不包含我的线,因此我的问题如何将此线与我的图像合并以将两者保存在一个文件中?如何合并一行图像并保存在文件中?
这里我保存的图像代码:
// Save image
var encoder1 = new PngBitmapEncoder();
encoder1.Frames.Add(BitmapFrame.Create((BitmapSource)image.Source));
using (FileStream stream = new FileStream("test.png", FileMode.Create))
encoder1.Save(stream);
行加入这样的:
grid2.Children.Add(myLine);
我怎么能合并符合图像同时保存两者兼而有之?
作品完美..!谢谢 – Norick