reggieb Offline Upload & Sell: Off
|
Hello! I've started a project that is still in its infancy, but I thought I'd share it with the community here so that like-minded people can hop on board and share tools and scripts that they code out for their photos.
I've just started writing some myself, and finished my first test script today. I plan to do some more useful scripts in the future, but this first one is designed to loop through a directory, and modify the EXIF info of any photos taken with my Sigma 500mm f/4 and update it to something a little bit more friendly.
Let me explain what I mean. When I upload a photo taken with a Nikon lens, I get a nice little blurb showing what lens was used, as seen below. Note that under the first photo, you see "Nikon AF-S Nikkor 300mm f/4E PF ED VR lens"
That's handy, everyone can see exactly what I used!
Annoyingly, the second photo is what it looks like when I shoot with my Sigma 500mm: "500 mm f/4 lens"
So I wrote a script that will loop through a folder of JPEGs and look for the line in the EXIF that corresponds to my 500mm, and change it to what you see in the third: "Sigma 500mm f/4 Sport"
More specifically, it creates a directory inside the specified directory called "AdjustedExif" and dumps identically named copies with the exif data updated. Note that it does add compression, and I'm going to update the script tonight or tomorrow to save at the highest possible quality, assuming the PIL Python library allows for such a change. But for web use, it should be OK. (EDIT: Alright, that was easy, it's updated to save in the highest possible quality, you can compress as desired later)
I plan to write scripts for my other third party lenses, but this is really a test. The next big thing I want to do is take the timestamps off of photos, and a corresponding GPS log provided by either my Bad Elf GPS device, or an Olympus TG-Tracker, and use them to add GPS coordinates to the metadata of my photos in a way that works more reliably than SnapBridge (and on older cameras)
Note that I don't know for sure that it will work on all cameras, though I think it should. The thing that might be different is the way that it names the lens in the metadata. But if you happen to want to use this and you find that it doesn't work with your cameras image files, a sample JPEG would be all I would need from you to get it working.
The file is really simple, and you would run it in the following way (and yes, I'll add a readme to the project, I just threw it up on Github this evening).
To use the script, you would have to have python installed and run the command in the following way:
Sigma500.py "E:/Photos/500 Sport Testing/JPEG"
Where E:/Photos/500 Sport Testing/JPEG is the directory where your photos live.
Once it finishes, you will find a folder inside that directory with your new photos.
Again, this project is in its infancy. This first script won't be useful to many people, but if even one person can use it, great! I plan to write more scripts that do similar things (as I mentioned above) and as I do I will update this post, and push them to the Git repo. Which can be found here: https://github.com/reggiebIV/PhotoProjects
If there's a lot of interest, and more contributors hop in, we might be able to share some pretty cool and useful tools.
Thanks for looking!
Edited on Jan 08, 2018 at 08:32 PM · View previous versions
|