I do not understand...
BitmapImage img = new BitmapImage(myUri);
Console.WriteLine("Width: {0}, Height: {1}", img.Width, img.Height);
Exit: "Width: 1, Height: 1".
I tried PixelWidth / PixelHeight, I tried to manually create it with BeginInit/ EndInitand also set PreservePixelFormat... nothing works.
(Also, it’s even weirder: this is all part of the process when the user clicks a button and some images are downloaded. Well, the second time this button is clicked, it has a non-1 width / height.)
source
share