Get Thumbnail image aspect ratio

May 27, 2014 at 1:36 PM
Hello,
i have a jpg file saved in a isolated storage.
I would a thumbnail (200x200) from this jpeg keep aspect ratio

this is a my code
using (var isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
                    {
                        WriteableBitmap wb = BitmapFactory.New(0, 0);
                        wb.FromStream(isolatedStorage.OpenFile("1.jpg", FileMode.Open, FileAccess.Read));

                        IsolatedStorageFileStream fileStream= isolatedStorage.CreateFile("1_thumb.jpg");

                        float aspectRatio = (float)wb.PixelWidth / wb.PixelHeight;

                        wb.SaveJpeg(fileStream, 200, (int) (200 / aspectRatio), 0, 100);

                        fileStream.Close();
                        wb = null;

                    }
it is correct?

wb.PixelWidth and wb.PixelHeight is 0!!

thank you