07-01-2009 08:12 AM
Anyone familar with a technique/tool to edit/add EXIF data to a JPG file? I am writing an application for user interface testing that has an attached webcam, and want to create/write the EXIF Comment field with information about where in the test the picture was taken, operator name, test version, DUT information, etc. so we can track "stray JPG" files that show up in our inbox without the rest of the test data.
I have seen the post on reading EXIF data (forums.ni.com) that points to the JHEAD application (JHEAD), but this tool won't allow adding anything other than date/time and a thumbnail.
07-06-2009 02:11 PM
07-06-2009 02:51 PM - edited 07-06-2009 02:53 PM
Hi Joe,
EXIF is rather easy to decode, and all manuals you need are online for free.
Once I made my own small tool to rename my digital camera pics automatically from something like "IMGxxxxx.JPG" to "YYYYMMDD_HHMMSS_number.jpg" based on EXIF information...
Or you search for some command-line tools that allow writing all those information to the EXIF/JPG. I'm sure there are also several for free!
07-06-2009 03:11 PM
David:
I agree that it is just a header, and Wikipedia has a bunch of clues where to head. However, this looks like one of those standards-but-not-standard things, where everyone does it a bit different. For example, Windows has an EXIF editor available via DLL, but there are several accounts of it having problems and corrupting pictures when used for more than reading the EXIF data. So when you look below the surface, it doesn't look like this is as easy as one would think.
I guess I was hoping that someone (NI, Lava?) had written a VI to do this and I just wasn't smart enough in my searches to find it.
07-06-2009 03:17 PM - edited 07-06-2009 03:19 PM
Hi Joe,
yes, things might get complicated when you start to build your own EXIF header for Jpegs.
For my Canon camera I found the possibility to embed a string of upto 200 chars without needing to change any structures in the EXIF header - this may be an option for you too...
Hint: you have to search for the "user comment" (or similar, don't have the manuals available) entry in the EXIF header.
07-07-2009 10:58 AM
07-13-2009 12:05 PM
05-05-2010 12:35 AM
Hmmm, It looks like no one has taken up this task. Too bad, as it would be great to take the GPS location from a serial port and add it to the JPG Exif header information collected from my video camera. Sounds like a great student project........
Andre
01-29-2019 08:53 AM
Hi Andre,
Did you found your student who solved the read/write GPS data in the EXIF section of an image? That‘s exactly what I‘m trying to do at the momment. Although pros here in the forum says it‘s easily done, me as a none SW-Guru don‘t proceed at all.
Anyone else who can support how to edit/add gps data of an image?
Any help appreciated! 🙂
urs
01-30-2019 01:42 PM
Hey Sapiophile,
I was able to find a few resources that might be helpful for you! I have attached them below.
How to get exposure values(aperture and exposure time) of pictures?
readout exif tag - image number
https://forums.ni.com/t5/LabWindows-CVI/readout-exif-tag-image-number/td-p/534192
Extract metadata from jpg? (date picture taken)
Image Resize and Image Convert function (.NET) Using LabVIEW
Also, the thread you are commenting on is pretty old. You might want to make a new forum post. This new post will have more exposure to active users of the forums, resulting in more people seeing your question and potentially better conversation with other users. I would suggest posting in our Machine Vision forum to get more targeted community assistant on this! Here is the link below.
MACHINE VISION
https://forums.ni.com/t5/Machine-Vision/bd-p/200