Hi there! Super new to IM, but I could not find an easy way to do this in the docs. I would like to create metadata labels to stick on the back of my photos. The photos have already been printed, so I do not want an overlay.
This image is an example of exactly what I am looking to do. The program used to generate this one can only do one image at a time, and I need to do this for over 300 images (which is why I am looking at IM).
I suspect I will need to write a script based on http://www.imagemagick.org/script/escape.php and viewtopic.php?t=18597.
However, I am a bit new to this as well, and I am not sure how I could go from printing the desired data for one image (using escapes) on command line to multiple images (recursively through multiple subdirectories). I am also not sure how I could obtain a format that looks similar to the one above -- maybe output a table or something? Any information would help! Thank you!
Making Printable Metadata Labels
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Making Printable Metadata Labels
This can be done, but the difficulty would depend on several things. You should let us know the ImageMagick version you're using and describe what operating system, version, etc., you'll be working on. Also, do all the photos contain the same EXIF attributes, or will the script have to accommodate images from different cameras? It would be helpful if you can provide a few more details.melrom wrote:Hi there! Super new to IM, but I could not find an easy way to do this in the docs. I would like to create metadata labels to stick on the back of my photos. The photos have already been printed, so I do not want an overlay.
Re: Making Printable Metadata Labels
Hi - thanks! I am working on Mac OS X 10.10.5 (Yosemite). Version: ImageMagick 6.9.3-0 Q16 x86_64 2016-01-08 http://www.imagemagick.org
Currently, I extracted the relevant metadata that I want into a text file. The format of the text file is as follows:
In addition, I extracted the thumbnails into the working directory as follows:
All I theoretically need to do at this point would be to grab the data that I want from the text file and make an image that has the thumbnail on the left side and then the text on the right side. I guess what I don't understand would be how to create the image from the thumbnail+text.
Currently, I extracted the relevant metadata that I want into a text file. The format of the text file is as follows:
Code: Select all
-------------------------------------------
File: P8240001.JPG - Date/Time Original: 2015:08:24 03:43:06
Camera: OLYMPUS IMAGING CORP. StylusTough-3000 - Serial Number: ######
(f/3.5, 1/30s, ISO 125)
-------------------------------------------
File: P8240002.JPG - Date/Time Original: 2015:08:24 03:43:47
Camera: OLYMPUS IMAGING CORP. StylusTough-3000 - Serial Number: ######
(f/3.5, 1/30s, ISO 100)
-------------------------------------------
Code: Select all
Original File: P8240001.JPG
Thumbnail File: P8240001_thumb.JPG
All I theoretically need to do at this point would be to grab the data that I want from the text file and make an image that has the thumbnail on the left side and then the text on the right side. I guess what I don't understand would be how to create the image from the thumbnail+text.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Making Printable Metadata Labels
The ImageMagick command could look like this. Windows BAT syntax. Adjust for your shell/script language:
The strings would really be environment variables, of course.
Code: Select all
convert ^
-size 423x84 xc:White ^
( rose: -resize 50x70^> ) ^
-gravity West -composite ^
-gravity NorthWest ^
-pointsize 10 ^
-annotate +60+15 "Title" ^
-annotate +60+50 "Author" ^
-pointsize 15 ^
-annotate +100+15 "Camera: OLYMPUS IMAGING CORP. StylusTough-3000 - Serial Number: ######" ^
out.png
snibgo's IM pages: im.snibgo.com
Re: Making Printable Metadata Labels
Hi - thank you -- one question based on this (sorry for being such a newb):
Is "rose" the name of the thumbnail in this suggestion? So, I should replace rose with P8240001_thumb.JPG?
Is "rose" the name of the thumbnail in this suggestion? So, I should replace rose with P8240001_thumb.JPG?
Re: Making Printable Metadata Labels
yes rose is an image built into Imagemagick hence the : after it. As you said replace it with your filename/
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Making Printable Metadata Labels
As Bonzo says. There are many ways of creating the required output. I give this example just to get you started. See http://www.imagemagick.org/script/comma ... p#annotate etc for explanations of the options.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Making Printable Metadata Labels
If you are on a Mac, then snibgo's syntax needs to be changed, since he is on Windows. Syntax for Windows and Unix systems differ. See http://www.imagemagick.org/Usage/windows/
In Unix, his command would be:
In Unix, his command would be:
Code: Select all
convert \
-size 423x84 xc:White \
\( rose: -resize 50x70^> \) \
-gravity West -composite \
-gravity NorthWest \
-pointsize 10 \
-annotate +60+15 "Title" \
-annotate +60+50 "Author" \
-pointsize 15 \
-annotate +100+15 "Camera: OLYMPUS IMAGING CORP. StylusTough-3000 - Serial Number: ######" \
out.png