Avatar of Wayne Barron
Wayne Barron
Flag for United States of America asked on

vb.net upload image and obtain Camera metadata

Hello, all.
(vb.net preferably)
I need to upload images and obtain the metadata from these images.
Now, the images are ones I've taken and will take in the future.
So, the data I am needed to obtain are Camera data.
An example of what I need is as follows.

Camera Maker - Canon 
Camera model - Canon EOS 800D
F-stop - f/3.5
Exposer time - 1/30 sec.
ISO speed - ISO-100
Focal length - 18 mm
Resolution - 72
Dimensions - 2121 x 2497

And other types as well.

I already know how to upload images but not get the metadata; that part is what I am working on now.

Thanks for any assistance.
Wayne

Visual Basic.NETASP.NET

Avatar of undefined
Last Comment
Wayne Barron

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
David H.H.Lee

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
louisfr

You can get all the properties using methods and properties of System.Drawing.Image. Some properties are directly available (such as Size). For other properties you can use PropertyIdList to get a list of available properties, or PropertyItems to also get their values, or GetProperty to get one particular property.
You can find property id definition here : https://docs.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-constant-image-property-tag-constants
The Type is defined here : https://docs.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-constant-image-property-tag-type-constants
Values for the Type constants :
PropertyTagTypeByte = 1,
PropertyTagTypeASCII = 2,
PropertyTagTypeShort = 3,
PropertyTagTypeLong = 4,
PropertyTagTypeRational = 5,
PropertyTagTypeUndefined = 7,
PropertyTagTypeSLONG = 9,
PropertyTagTypeSRational = 10,
Wayne Barron

ASKER
louisfr
From what I've read, the GDI is slow.

David
EXIF looks promising if I can find a vb.net (Web) example.
Also, is there something that needs to be imported for the EXIF, or is it a built-in library?
Wayne Barron

ASKER
This is promising.
I will have to look into the code and hopefully translate what I need over to vb.net as it is C#.
ExifLib - A Fast Exif Data Extractor for .NET 2.0+
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Wayne Barron

ASKER
Had to install the exiflib from the NuGet.
Wayne Barron

ASKER
Going to open another question for using the ExifLib.
Thanks, David.

Wayne.