title: Image with high resolution not working properly when sending from Windows phone 8 application
body: <p>I am working on a Windows phone 8 chat application. I need to be able to send images. I am able to send images with low resolution but when I try to send high resolution images (10240 x 6400) the resulting image is not what I expected. <img src="https://i.stack.imgur.com/a4Jh1.jpg" alt="This is my high resolution image"> and <img src="https://i.stack.imgur.com/Su2jL.jpg" alt="this is the image that is being displayed">. As you can see only some portion of the image is being showed while the remaining area is grey. I think the problem is with how I am cropping and/or re-sizing the images. I am converting my image into a WriteableBitmap object and resizing it in this method. The parameter requiredImageSize = 800.</p>
  
  <pre><code>     private WriteableBitmap ResizeLargeWriteableBitmapImage(WriteableBitmap bitmap, int requiredImageSize)
      {
          WriteableBitmap resized;
  
          int tnWidth = 0;
          int tnHeight = 0;
  
          if (bitmap.PixelWidth &gt;= bitmap.PixelHeight)
          {
              if (bitmap.PixelWidth &lt;= requiredImageSize)
                  tnWidth = bitmap.PixelWidth;
              else
                  tnWidth = requiredImageSize;
          }
          else if (bitmap.PixelHeight &gt;= bitmap.PixelWidth)
          {
              if (bitmap.PixelHeight &lt;= requiredImageSize)
                  tnHeight = bitmap.PixelHeight;
              else
                  tnHeight = requiredImageSize;
          }
  
          if (tnWidth &gt; 0)
          {
              tnHeight = (bitmap.PixelHeight * tnWidth) / bitmap.PixelWidth;
  
          }
          else if (tnHeight &gt; 0)
          {
              tnWidth = (bitmap.PixelWidth * tnHeight) / bitmap.PixelHeight;
          }
  
          resized = bitmap.Resize(tnWidth, tnHeight, WriteableBitmapExtensions.Interpolation.Bilinear);
  
          return resized;
      }
  </code></pre>
  
  <p>and I am saving the WriteableBitmap object as a JPEG image</p>
  
  <pre><code>    writableImage.SaveJpeg(msThumbnailImage, writableImage.PixelWidth, writableImage.PixelHeight, 0, 100);
  </code></pre>
  
  <p>Then I am saving the image into local storage and displaying it (where it is displaying as I said before). Why is this happening. Have I done anything wrong in the code?</p>