The following code snippet illustrates how one might report the
natural dimensions of an image.
using (Doc doc = new Doc()) {
string thePath = Server.MapPath("../mypics/mypic.jpg");
int theID1 = doc.AddImageFile(thePath, 1);
int theID2 = doc.GetInfoInt(theID1, "XObject");
string theWidth = doc.GetInfo(theID2, "Width");
string theHeight = doc.GetInfo(theID2, "Height");
Response.Write($"Width {theWidth}< br>");
Response.Write($"Height {theHeight}< br>");
}
Using doc As New Doc()
Dim thePath As String = Server.MapPath("../mypics/mypic.jpg")
Dim theID1 As Integer = doc.AddImageFile(thePath, 1)
Dim theID2 As Integer = doc.GetInfoInt(theID1, "XObject")
Dim theWidth As String = doc.GetInfo(theID2, "Width")
Dim theHeight As String = doc.GetInfo(theID2, "Height")
Response.Write($"Width {theWidth}< br>")
Response.Write($"Height {theHeight}< br>")
End Using
This is the kind of output you might expect.