Image size

How can I obtain the size of an image (number of pixels horizontal and vertical) in VB.NET 2003? The image will be a file on the harddisk in either BMP, GIF, JPG, PNG, ICO or EMF format.

Thanks
SETPAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Dim img As Image = Image.FromFile("c:\someImage.ext")
MsgBox(img.Width & "x" & img.Height)
img.Dispose()
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.