I would like to build a function that inserts a JPG in a xelatex file and automatically caption it with information extracted from the JPG's EXIF data, such as exposure time, etc. How can I do that?
-
2I don't know anything about xelatex, but this question shows how to extract the EXIF data to a text file using imagemagick at the command line. Maybe that could be part of your automated workflow. stackoverflow.com/questions/26654709/…– JamesMar 1, 2016 at 15:14
-
Yes, there are many ways to extract exif info through the command line and I'm familiar with some of them. I'm hoping for a more straightforward way, possibly with some package.– abeyMar 1, 2016 at 15:32
1 Answer
You can use bashful
to run external commands, i.e.:
\documentclass{article}
\usepackage{bashful}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=90mm]{image.jpg}
\bash[stdout]
exiftool image.jpg
\END
\end{document}