Click here to Skip to main content
15,886,518 members
Articles / Programming Languages / Visual Basic
Article

The ExifWorks class

Rate me:
Please Sign up or sign in to vote.
4.43/5 (27 votes)
1 Feb 2006MIT2 min read 331.8K   8.9K   87   83
The ExifWorks is a class written in 100% pure managed VB.NET, which allows comfortable reading of embedded EXIF metadata.

What is EXIF

EXIF stands for Exchangeable Image File Format. This format is used for storing various metadata in images, and is widely used mainly in digital still cameras. More information about EXIF can be found here, or in the document Description of the EXIF file format by TsuruZoh Tachibanaya.

When I was trying to find any sources regarding comfort access from .NET environment to these data, I was not successful. So I wrote this class and gave it freely available as open source.

What is ExifWorks

ExifWorks is a class written in 100% pure managed VB.NET, which allows comfort reading and writing of embedded EXIF metadata. It has the following features:

  • Provides the TagNames Enum, which contains user-friendly constant names for all known EXIF parameter IDs.
  • Provides generic functions for reading EXIF parameters: GetInt16, GetInt32, GetString, and GetRational, as well as GetPropertyInt16, GetPropertyInt32, GetPropertyString, and GetPropertyRational. They may be used to simplify the access to all EXIF data from your custom application.
  • Provides a user-friendly abstraction layer for most of the common parameters, allowing easy work with EXIF data and their presentation to end users. The abstraction layer has been developed for presentation, so even if a value is not present, some data (in valid syntax) are provided. Either default values or values computed from other sources (i.e. shutter speed vs. exposure time) are provided. If you need exact data, use the generic functions instead.

The provided test application exread.exe shows working with the ExifWorks class.

Licensing

ExifReader/ExifWorks .NET library

Copyright (c) Michal A. Valášek - Altair Communícations, 2003-2006

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

The text of the GNU Lesser General Public License (LGPL) is available online here.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer Altairis
Czech Republic Czech Republic

Software architect and developer in Altairis, dev shop in Czech republic. Microsoft Most Valuable Professional (MVP) since 2004.


See my open source project at Codeplex.


Comments and Discussions

 
QuestionExif in Tiff Pin
Member 1070895117-Jan-22 1:48
Member 1070895117-Jan-22 1:48 
QuestionLat, Lon, Altitude Pin
BryanBentz13-Jan-21 2:39
BryanBentz13-Jan-21 2:39 
QuestionPerfect Pin
PBureau19-Apr-20 1:25
PBureau19-Apr-20 1:25 
QuestionThanks! Pin
Dmitry Zherebilo3-Feb-19 2:49
Dmitry Zherebilo3-Feb-19 2:49 
PraiseMy vote of 5 Pin
Daniel Kamisnki30-Sep-18 5:51
Daniel Kamisnki30-Sep-18 5:51 
Questionexread Pin
Mike C. Adams21-Jun-18 11:21
Mike C. Adams21-Jun-18 11:21 
QuestionAdding comments using ExifWorks Pin
Sdolby5-Jun-16 8:09
Sdolby5-Jun-16 8:09 
BugThere's a mistake in the Byte() to Int32 conversion... I've posted the fix here: Pin
Sarah Cartwright18-May-14 22:25
Sarah Cartwright18-May-14 22:25 
SuggestionHandling Shutter speed in a better way 0.5 to 1/2 and 0.16667 to 1/6th Pin
Rcd727-Jul-13 8:05
Rcd727-Jul-13 8:05 
Questionkeywords Pin
sharkyigor7-Jul-13 8:21
sharkyigor7-Jul-13 8:21 
AnswerRe: keywords Pin
Sdolby10-Sep-16 10:48
Sdolby10-Sep-16 10:48 
SuggestionCorrecting Exposure Time to display 1/200 instead of 0.005s Pin
Tino Fourie17-Jun-13 14:37
Tino Fourie17-Jun-13 14:37 
QuestionExifISOSpeed = &H8827 ' decimal 34855 ISO Speed 100, 200, 400, etc. Pin
beppe marino22-May-13 7:25
beppe marino22-May-13 7:25 
QuestionAltitudeRef Pin
Archdeacon9-Sep-12 15:09
Archdeacon9-Sep-12 15:09 
Questionmistake Pin
huelsmann2-Jul-12 20:42
huelsmann2-Jul-12 20:42 
QuestionBasic Documentation Pin
CeremBeyazit22-Jun-12 7:02
CeremBeyazit22-Jun-12 7:02 
QuestionCorrect display int16 ("Exposure time" < 1/255 s) and Int32 value Pin
andbag1-Apr-12 22:20
andbag1-Apr-12 22:20 
GeneralMy vote of 5 Pin
Mohammad_02112-Nov-11 22:24
Mohammad_02112-Nov-11 22:24 
QuestionEXIF GPS Latitude and others Pin
bridgfod13-Aug-11 17:20
bridgfod13-Aug-11 17:20 
AnswerRe: EXIF GPS Latitude and others Pin
bridgfod15-Aug-11 2:21
bridgfod15-Aug-11 2:21 
GeneralAltitude and ImgDir Pin
JustinMW12-Nov-10 10:54
JustinMW12-Nov-10 10:54 
QuestionExifWorks Subject Distance Pin
Archdeacon4-Sep-10 22:56
Archdeacon4-Sep-10 22:56 
I have tried this on a bunch of JPG photos and I get 0.0 always returned as SubjectDistance.
Can anyone advise please?
AnswerRe: ExifWorks Subject Distance Pin
adam-jw28-Sep-11 3:12
adam-jw28-Sep-11 3:12 
GeneralMy vote of 4 Pin
Archit937328444824-Jul-10 7:44
Archit937328444824-Jul-10 7:44 
GeneralSaving edits Pin
calipo19-Aug-09 6:09
calipo19-Aug-09 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.