If you want the get the size of an image, you need to load it in a BitmapImage
:
int width = 0;
int height = 0;
using (var stream = Application.GetResourceStream(new Uri("Assets/test.jpg", UriKind.Relative)).Stream)
{
var bmpi = new BitmapImage();
bmpi.SetSource(stream);
bmpi.CreateOptions = BitmapCreateOptions.None;
width = bmpi.PixelWidth;
height = bmpi.PixelHeight;
bmpi = null; // Avoids memory leaks
}