Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding EXIF Info to Images in C#

I want to add basic exif info to images like author,camera model,date etc.Is there a way to do this using the Inbuilt classes without using other external libraries.Does the image formats like JPEG,PNG,TIFF,BMP,GIF Support all EXIF Fields.

like image 951
techno Avatar asked Jun 13 '12 09:06

techno


People also ask

Can you add your own EXIF parameters?

EXIF key-value pairs are called tags, and each tag can contain either a string or numeric value. There are dozens of tags in the current EXIF standard (version 2.32), and anyone — from smartphone and camera manufacturers to photographers — is free to add their own.

How do you enter EXIF data?

On a Windows PC using File Explorer right-click on the file you want to see the data for. You will see a window pop up with various options. Click on Properties and then on Details. This will bring up the EXIF data for that photo.

How do you write an EXIF?

To write Exif data to a JPEG, you need to write an APP1/Exif segment as part of the normal JIF structure. The EXIFWriter will write the data you should put inside this segment only. Everything else must be provided by you. There are multiple ways of achieving this.


1 Answers

System.Drawing allows modifying the image properties with PropertyItems/SetPropertyItem. A sample can be found here.

But this access is quite basic and there are quite a few libraries around (see for instance How to edit EXIF data in .NET). So I wonder if it's worth the trouble.

After all, only JPEG and TIFF files support EXIF metadata according to Wikipedia.

like image 145
Paul B. Avatar answered Oct 16 '22 01:10

Paul B.