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();
};