【发布时间】:2011-01-29 13:33:06
【问题描述】:
我想显示由 两张 图像组成的图像。
我希望图像 rectangle.png 与图像 sticker.png 一起显示在它的 top 上,其 left-hand 像素 10、10 处的角。
这是我所知道的,但是如何组合图像?
Image image = new Image();
image.Source = new BitmapImage(new Uri(@"c:\test\rectangle.png"));
image.Stretch = Stretch.None;
image.HorizontalAlignment = HorizontalAlignment.Left;
Image imageSticker = new Image();
imageSticker.Source = new BitmapImage(new Uri(@"c:\test\sticker.png"));
image.OverlayImage(imageSticker, 10, 10); //how to do this?
TheContent.Content = image;
【问题讨论】:
标签: c# wpf image image-processing overlay