Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should clarify your question, but I suppose <code>Path</code> is the location of your image in isolated storage. Providing that <code>Image</code> is the name of your Image in xaml</p> <pre><code>img.Source = GetImage(LoadIfExists(image.Path)); </code></pre> <p><code>LoadIfExists</code> returns the binary data for a file in Isolated Storage, and GetImage returns it as a <code>WriteableBitmap</code> :</p> <pre><code> public static WriteableBitmap GetImage(byte[] buffer) { int width = buffer[0] * 256 + buffer[1]; int height = buffer[2] * 256 + buffer[3]; long matrixSize = width * height; WriteableBitmap retVal = new WriteableBitmap(width, height); int bufferPos = 4; for (int matrixPos = 0; matrixPos &lt; matrixSize; matrixPos++) { int pixel = buffer[bufferPos++]; pixel = pixel &lt;&lt; 8 | buffer[bufferPos++]; pixel = pixel &lt;&lt; 8 | buffer[bufferPos++]; pixel = pixel &lt;&lt; 8 | buffer[bufferPos++]; retVal.Pixels[matrixPos] = pixel; } return retVal; } public static byte[] LoadIfExists(string fileName) { byte[] retVal; using (IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication()) { if (iso.FileExists(fileName)) { using (IsolatedStorageFileStream stream = iso.OpenFile(fileName, FileMode.Open)) { retVal = new byte[stream.Length]; stream.Read(retVal, 0, retVal.Length); } } else { retVal = new byte[0]; } } return retVal; } </code></pre> <p>If you want to write the image into the Picture Library, it's basically the same process, ending by calling <code>SavePictureToCameraRoll()</code> of <code>MediaLibrary</code> as explained on this <a href="http://msdn.microsoft.com/en-us/library/ff769549%28v=vs.92%29.aspx" rel="nofollow">MSDN Article</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload