I am trying to display a bitmap image on the UI but it doesn’t work if I use a JPG file in the resources. BMP works fine but the files are 25 times the size.
Smaller bitmaps seem to work fine. The test one is 445 x 500 pixels. I preload the bitmap when the class is created and then use this code to draw the bitmap onto the Image.
clockDisplay.Clear();
clockDisplay.DrawImage(number0, 0, 0);
clockImage.Source = BitmapImage.FromGraphics(clockDisplay);
clockImage.Invalidate();
This what is looks like with BMP format in the resources.
and this is what it looks like in the JPG format in the resources