Image Dimensions?

J

James T.

Hello!

I am using following code to get all JPEG files in a directory. Data,
including file name, length, creation date, etc will be stored in a
DataTable. Now I would like to add two extra colums to the DataTable -
height and width.

I was wondering, what is the fastest way to get the dimensions (height and
width) of image stored on server hd?

Dim Directory As New IO.DirectoryInfo(Path)
Dim File As IO.FileInfo
Dim Files As IO.FileInfo() = Directory.GetFiles("*.jpg")

Thanks!
James
 
G

Guest

I was wondering, what is the fastest way to get the dimensions (height
and width) of image stored on server hd?

Dim Directory As New IO.DirectoryInfo(Path)
Dim File As IO.FileInfo
Dim Files As IO.FileInfo() = Directory.GetFiles("*.jpg")

I believe the System.Image classes can retrieve JPEG size and width. That's
probably the fastest method.

Or you can extract a whole bunch of info via EXIF.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top