1
我正在使用下面的代码在图像上写文本。但我无法保存它.IS有没有办法将更改保存到新图像或覆盖现有图像?如何将writeablebitmap保存到使用c#.net的windows phone中的新图像?
BitmapImage img = new BitmapImage(new Uri(@"\DefaultImage.jpg", UriKind.Relative));
img.CreateOptions = BitmapCreateOptions.None;
img.ImageOpened += (s, e) =>
{
WriteableBitmap wbitmap = new WriteableBitmap((BitmapImage)s);
TextBlock textBlock = new TextBlock();
textBlock.Text = stringToRender;
wbitmap.Render(textBlock, null);
wbitmap.Invalidate();
};