{"id":20636252,"url":"https://github.com/ellman12/datetakenextractor","last_synced_at":"2026-03-10T00:34:10.269Z","repository":{"id":65485641,"uuid":"488821592","full_name":"ellman12/DateTakenExtractor","owner":"ellman12","description":"Small, fast, simple library for reading and writing Date Taken metadata for photos and videos.","archived":false,"fork":false,"pushed_at":"2024-09-04T20:42:03.000Z","size":36587,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T01:46:06.461Z","etag":null,"topics":["csharp","date-taken","datetaken","datetakenextractor","datetime","datetime-library","dotnet","metadata","metadata-extraction","metadata-extractor","nuget"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ellman12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-05-05T03:41:48.000Z","updated_at":"2024-10-08T21:44:28.000Z","dependencies_parsed_at":"2024-02-27T08:09:00.070Z","dependency_job_id":null,"html_url":"https://github.com/ellman12/DateTakenExtractor","commit_stats":null,"previous_names":["ellman12/date-taken-extractor"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellman12%2FDateTakenExtractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellman12%2FDateTakenExtractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellman12%2FDateTakenExtractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellman12%2FDateTakenExtractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ellman12","download_url":"https://codeload.github.com/ellman12/DateTakenExtractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234331303,"owners_count":18815361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","date-taken","datetaken","datetakenextractor","datetime","datetime-library","dotnet","metadata","metadata-extraction","metadata-extractor","nuget"],"created_at":"2024-11-16T15:09:47.828Z","updated_at":"2025-09-26T18:31:28.310Z","avatar_url":"https://github.com/ellman12.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DateTakenExtractor\n\n[![DateTakenExtractor NuGet version](https://img.shields.io/nuget/v/DateTakenExtractor)](https://www.nuget.org/packages/DateTakenExtractor/)\n[![DateTakenExtractor Nuget download count](https://img.shields.io/nuget/dt/DateTakenExtractor)](https://www.nuget.org/packages/DateTakenExtractor/)\n\nDateTakenExtractor (DTE) is a small, fast, simple library for reading and writing Date Taken metadata for photos and videos, with the library consisting of only a single ```static``` C# class.\n\nDTE is essentially a simplified wrapper around [MetadataExtractor](https://github.com/drewnoakes/metadata-extractor-dotnet), designed to make it easier for me to read and write this data in my [two](https://github.com/ellman12/Photos-Storage-Server/) [projects](https://github.com/ellman12/Graphical-Photo-Organizer) that use it. DTE also provides an abstraction around [ExifTool](https://exiftool.org/), an excellent command line tool which I use to read certain types of metadata, as well as write/update Date Taken metadata.\n\n## Installing DateTakenExtractor\nThe easiest way to use this library is via its [NuGet package](https://www.nuget.org/packages/DateTakenExtractor/).\n\nEither add this to your project file\n```xml\n\u003cItemGroup\u003e\n    \u003cPackageReference Include=\"DateTakenExtractor\" Version=\"1.2.1\"/\u003e\n\u003c/ItemGroup\u003e\n```\n\nOr type this in Visual Studio's Package Manager Console:\n```\nPM\u003e Install-Package DateTakenExtractor\n```\n\nOr search for `DateTakenExtractor` in the NuGet Package Manager in Visual Studio or JetBrains Rider.\n\n**DTE also REQUIRES [ExifTool](https://exiftool.org/).**\n\u003cbr\u003eTo install ExifTool, download the .exe, rename it from `exiftool(-k).exe` to `exiftool.exe`, and add it to your `PATH` or move the .exe to a directory already in the `PATH`, like `C:/Windows`.\n\n## Using DateTakenExtractor\nDateTakenExtractor is very simple to use. The class contains several public methods for your use.\n\n```c#\nusing D = DateTakenExtractor.DateTakenExtractor;\n\n//These methods can take either file paths as strings, or FileStreams.\n//First checks the metadata, then the filename, for the Date Taken (DT) data. dateTakenSrc would either be 'Metadata', 'Filename', or 'None'.\nDateTime? autoResult = D.GetDateTakenAuto(\"C:/yourfilehere.jpg\", out DateTakenSrc dateTakenSrc);\n\n//Checks only the metadata of the file for DT data. null if none found.\nDateTime? metadataResult = D.GetDateTakenFromMetadata(\"C:/yourfilehere.jpg\");\n\n//Checks only the filename of the file for DT data. Notice the timestamp pattern ↓ in the filename. null if none found.\nDateTime? filenameResult = D.GetDateTakenFromFilename(\"C:/IMG_20210320_175909.jpg\");\n\n//Attempt to get DT data from both the metadata AND the filename.\nD.GetDateTakenFromBoth(\"C:/IMG_20210320_175909.jpg\", out DateTime? metadataDT, out DateTime? filenameDT);\n\n//New in V1.1: updating Date Taken metadata! This works for .jpg, .png, .mp4, and .mov files.\n//.gif and .mkv files are iffy since they're not really meant to contain this kind of data.\nD.UpdateDateTaken(\"C:/IMG_20210320_175909.jpg\", new DateTime(2020, 6, 9, 12, 30, 0));\n```\n\nDate Taken metadata can come from two locations: the file's actual internal metadata, or its filename. If a DTE method can't find the Date Taken in the metadata or the filename, the return value/out parameter is set to `null`.\n\n### Supported file types:\n* JPG\n* PNG\n* GIF\n* MP4\n* MOV\n* MKV\n\n## Contributing to DateTakenExtractor\nTo contribute to DateTakenExtractor, follow these steps:\n\n1. Fork this repository.\n2. Create a branch: `git checkout -b \u003cbranch_name\u003e`.\n3. Make your changes and commit them: `git commit -m '\u003ccommit_message\u003e'`\n4. Push to the original branch: `git push origin DateTakenExtractor/\u003clocation\u003e`\n5. Create the pull request.\n\nAlternatively see the GitHub documentation on [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).\n\nFeel free to either email me or contribute if you spot a bug 🐛 or have a feature idea 💡.\n\n## Contact\nIf you want to contact me you can reach me at ellduc4@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellman12%2Fdatetakenextractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellman12%2Fdatetakenextractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellman12%2Fdatetakenextractor/lists"}