Hi all, newbie here
I have seen this thread viewtopic.php?f=1&t=19423
and I have seen Bonzo's useful examplke batch file scripts http://www.rubblewebs.co.uk/imagemagick/batch.php
but i have struggled and failed!!
Please can someone give me some code for a batch file that will write the date take to the bottom right hand corner of all images in a specified folder?
Stamp All Images in a Folder with Date Taken (EXIF)
-
- Posts: 2
- Joined: 2012-04-04T03:14:36-07:00
- Authentication code: 8675308
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stamp All Images in a Folder with Date Taken (EXIF)
Something like...
DANGER, the above replaces images. add a -path to specify a output directory for the chnaged images, and make sure you have backups!
See Mogrify
http://www.imagemagick.org/Usage/basics/#mogrify
Also see "jhead" program whcih can adjust dates and times in image files without touching the actual image data
http://www.sentex.net/~mwandel/jhead/
Code: Select all
mogrify -gravity SouthEast -annotate +5+5 '%[EXIF:DateTime]' *.jpg
See Mogrify
http://www.imagemagick.org/Usage/basics/#mogrify
Also see "jhead" program whcih can adjust dates and times in image files without touching the actual image data
http://www.sentex.net/~mwandel/jhead/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
-
- Posts: 2
- Joined: 2012-04-04T03:14:36-07:00
- Authentication code: 8675308
Re: Stamp All Images in a Folder with Date Taken (EXIF)
That doesnt work in a batch file because it is treated as a system variable it would appear, is there a workaround for that?anthony wrote:Something like...Code: Select all
mogrify -gravity SouthEast -annotate +5+5 '%[EXIF:DateTime]' *.jpg
The command that is run is:
Code: Select all
mogrify -gravity SouthEast -annotate +5+5 'DateTime]' *.jpg
Re: Stamp All Images in a Folder with Date Taken (EXIF)
You need to escape the % with another % in a batch file so use '%%[EXIF:DateTime]'
I think there was a similar post about this a couple of weeks ago.
Thanks for the comment about my website
I think there was a similar post about this a couple of weeks ago.
Thanks for the comment about my website
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stamp All Images in a Folder with Date Taken (EXIF)
You are using DOS scripts, which requires the '%' to be escaped by doubling EG '%%'.
See IM Examples, Windows Usage, DOS
http://www.imagemagick.org/Usage/windows/#dos
You also need to use double quotes " instead of single quotes '
DOS is just a different 'shell' or 'scripting language', as is VB, PHP, Perl, Ruby. Each has its own specific requirements!
See IM Examples, Windows Usage, DOS
http://www.imagemagick.org/Usage/windows/#dos
You also need to use double quotes " instead of single quotes '
DOS is just a different 'shell' or 'scripting language', as is VB, PHP, Perl, Ruby. Each has its own specific requirements!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/