What you request requires advanced skills to implement for a specific context (language, development environment, image formats, hardware). imho, you'll need to develop your skills and knowledge for a specific context ... like C#, Windows, Visual Studio, WinForms ... and, you'll need to do a lot of experimenting. For an introduction to graphics in WinForms, I'd recommend Rod Stephens' 2008 "C# Graphics Programming" [
^].
WPF offers much more advanced graphics capabilities: [
^]
Do keep in mind what Richard MacCutchan said about image file co-ordinates being independent of any device ! In C# I would access the image file's internal data using code like this: [
^]
Image img = Image.FromFile(fileName);
ImageFormat format = img.RawFormat;
Console.WriteLine("Image Type : "+format.ToString());
Console.WriteLine("Image width : "+img.Width);
Console.WriteLine("Image height : "+img.Height);
Console.WriteLine("Image resolution : "+(img.VerticalResolution*img.HorizontalResolution));
Console.WriteLine("Image Pixel depth : "+Image.GetPixelFormatSize(img.PixelFormat));
Console.WriteLine("Image Creation Date : "+creation.ToString("yyyy-MM-dd"));
Console.WriteLine("Image Creation Time : "+creation.ToString("hh:mm:ss"));
Console.WriteLine("Image Modification Date : "+modify.ToString("yyyy-MM-dd"));
Console.WriteLine("Image Modification Time : "+modify.ToString("hh:mm:ss"));
Now, consider the factors that may influence the aspect ratio, and pixel dimensions, of your app when displayed on a monitor in Windows:
1) monitor resolution ... which can be set by the user
2) OS global front/window scaling factor ... which can be set by the user
3) video card capabilities ... hardware limits; user settings
4) AutoScaleMode setting in C# Visual Studio WinForms ... which can be set by the user
Then, consider if you are displaying the image in a container control, like a WinForms PictureBox, or, in WinForms, you are using the Paint event to
render the image on some control.