что такое COM ???
private void SaveToIsolatedStorage(Stream imageStream, string fileName, byte[] arr)
{
try
{
using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
if (myIsolatedStorage.FileExists(fileName))
{
myIsolatedStorage.DeleteFile(fileName);
}
myIsolatedStorage.CreateDirectory("Album");
IsolatedStorageFileStream fileStream = myIsolatedStorage.CreateFile(fileName);
fileStream.Write(arr, 0, arr.Length);
fileStream.Close();
return;
BitmapImage bitmap = new BitmapImage();
bitmap.SetSource(imageStream);
WriteableBitmap wb = new WriteableBitmap(bitmap);
wb.SaveJpeg(fileStream, wb.PixelWidth, wb.PixelHeight, 0, 85);
fileStream.Close();
}
}
catch (Exception ex) { }
}
и
Stream uc = new MemoryStream(img);
SaveToIsolatedStorage(uc, tempJPEG, img);