gpt4 book ai didi

windows-phone-7 - 将图像保存到隔离存储中

转载 作者:行者123 更新时间:2023-12-04 07:09:36 26 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
store image into isolated storage in windows phone 7

我正在使用 Visual Studio/Expression Blend 为 Windows Phone 7 创建我的应用程序。用户应该能够选择他/她想要编辑的图片,编辑后,用户可以单击“保存”按钮并特定的编辑图像将保存在隔离存储中。但是我无法通过按钮单击事件将图像保存到独立存储。

有没有人有代码示例说明如何实现这一点?谢谢!

我的按钮代码:

using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication()) 

{

var bi = new BitmapImage(); bi.SetSource(pic);

var wb = new WriteableBitmap(lion.jpg,lion.jpg.RenderTransform);

using (var isoFileStream = isoStore.CreateFile("somepic.jpg"))

{

var width = wb.PixelWidth;

var height = wb.PixelHeight;

Extensions.SaveJpeg(wb, isoFileStream, width, height, 0, 100);

}
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com