title: Loading image saved locally in Xamarin?
body: <p>I have made a method to save a Bitmap image fetched from a CDN to local storage. Find code below:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Method to store the bitmap image fetched from the CDN locally.
      /// &lt;/summary&gt;
      /// &lt;returns&gt;&lt;/returns&gt;
      public bool StoreDownloadedImageLocally(Bitmap image, string extension)
      {
          try
          {
              var directoryPath = absolutePath;
              var filePath = System.IO.Path.Combine(directoryPath, extension + ".png");
  
              using (var stream = new FileStream(filePath, FileMode.Create))
              {
                  image.Compress(Bitmap.CompressFormat.Png, 100, stream);
              }
  
              return true;
          }
          catch (Exception)
          {
              return false;
          }
  </code></pre>
  
  <p>I now need to create a method so that I can fetch the image I have just saved. The app needs to be able to display images offline, hence storing them locally once downloaded. Any ideas?</p>
  
  <p>Many thanks in advance.</p>