Editing Exif Jpeg data.


  • Hi

    Trying to edit the tags and title of over 2000 images in bulk. But I'm having a problem; I don't know how. I've looked online on how to do it and all the classes I'd expect to be there a not. For example. I can't do 'Image.FromFile(File)' because it isn't there. I haven't a clue as to what can do to allow me to bulk edit this batch of images automatically. Am I missing something blatantly obvious?



    Thursday, April 20, 2017 7:21 PM

All replies

  • Hello,

     Not all JPG/JPEG files will have an EXIF header.  But for files that do you need to

    read about this information from the following link;


      Topic Links: 


      Please take the time to read the articles. 

     Hope this helps :)

    • Edited by User3DX Friday, April 21, 2017 1:34 AM Links Added
    Friday, April 21, 2017 1:27 AM
  • Like User3DX clarified, JPEG images might be EXIF files, but they could also be JFIF with no Exif header.
    If you still haven't solved this, consider using the LEADTOOLS imaging toolkit ( which you can use to process your JPEG images, examine whether they're Exif and write EXIF comments to them. (Disclaimer: I am an employee of the vendor of this toolkit).

    The toolkit supports reading and writing the EXIF comments mentioned here:

    The code to do this would look like something like this:

    string[] imageList = Directory.GetFiles(@"Path to Images Folder");
    foreach (string imageFileName in imageList)
        using (RasterCodecs codecs = new RasterCodecs())
            RasterImageFormat format;
            using (CodecsImageInfo info = codecs.GetInformation(imageFileName, false))
                format = info.Format;
            if (RasterCodecs.CommentsSupported(format))
            // to check for Exif, change previous line to become:
            // if (format == RasterImageFormat.ExifJpeg || format == RasterImageFormat.ExifJpeg411)
                RasterCommentMetadata comment = new RasterCommentMetadata();
                comment.Type = RasterCommentMetadataType.Title;
                comment.FromAscii("New Title");
                codecs.WriteComment(imageFileName, 1, comment);

    • Edited by Hussam_B Thursday, December 7, 2017 5:22 PM
    Thursday, December 7, 2017 5:19 PM