Changing “DateTaken” of a photo

前端 未结 3 1022
情歌与酒
情歌与酒 2021-01-01 20:24

I just came back from a trip to the US, and after editing all the photos, I noticed that the camera used the Israeli time zone, and not the american. There is a 7 hours time

3条回答
  •  Happy的楠姐
    2021-01-01 21:03

    For .NET Core I used NuGet package ExifLibNet (https://github.com/oozcitak/exiflibrary)

    PM> Install-Package ExifLibNet

    // using ExifLibrary;
    
    var file = ImageFile.FromFile(filename);
    file.Properties.Set(ExifTag.DateTimeDigitized, dateTime);
    file.Properties.Set(ExifTag.DateTimeOriginal, dateTime);
    file.Save(filename);
    

提交回复
热议问题