locked
Get height and width properties from the storagefile that is an image without making a bitmap

    Question

  • I would like to get the height and width of an image that is Storagefile object. I don't want to use the memory or processing create a bitmapimage object with the storagefile to get these properties. How would I do this?

    Thanks,

    Mark


    mark

    Wednesday, June 04, 2014 2:11 PM

Answers

  • You can read those from the StorageFile properties. They are often needed before you can read the StorageFile into a bitmap.

    See StorageFile.Properties. GetImagePropertiesAsync then look at the ImageProperties' Height and Width.

    • Marked as answer by Mark_E_R Wednesday, June 04, 2014 4:38 PM
    Wednesday, June 04, 2014 2:36 PM
    Owner