Answers:
jhead可以做到这一点。
假设您知道某张照片已拍摄,2017-04-19 16:20
但当前日期显示为2007-09-01 00:15
,则可以jpg
通过执行以下操作将文件夹中的所有照片调整为正确的时间:
jhead -da2017:04:19/16:20-2007:09:01/00:15 *.jpg
以下是手册的摘录:
DATE / TIME MANIPULATION:
-ft Set file modification time to Exif time
-dsft Set Exif time to file modification time
-n[format-string]
Rename files according to date. Uses exif date if present, file
date otherwise. If the optional format-string is not supplied,
the format is mmdd-hhmmss. If a format-string is given, it is
is passed to the 'strftime' function for formatting
In addition to strftime format codes:
'%f' as part of the string will include the original file name
'%i' will include a sequence number, starting from 1. You can
You can specify '%03i' for example to get leading zeros.
This feature is useful for ordering files from multiple digicams to
sequence of taking. Only renames files whose names are mostly
numerical (as assigned by digicam)
The '.jpg' is automatically added to the end of the name. If the
destination name already exists, a letter or digit is added to
the end of the name to make it unique.
-nf[format-string]
Same as -n, but rename regardless of original name
-a (Windows only) Rename files with same name but different extension
Use together with -n to rename .AVI files from exif in .THM files
for example
-ta<+|->h[:mm[:ss]]
Adjust time by h:mm backwards or forwards. Useful when having
taken pictures with the wrong time set on the camera, such as when
traveling across time zones or DST changes. Dates can be adjusted
by offsetting by 24 hours or more. For large date adjustments,
use the -da option
-da<date>-<date>
Adjust date by large amounts. This is used to fix photos from
cameras where the date got set back to the default camera date
by accident or battery removal.
To deal with different months and years having different numbers of
days, a simple date-month-year offset would result in unexpected
results. Instead, the difference is specified as desired date
minus original date. Date is specified as yyyy:mm:dd or as date
and time in the format yyyy:mm:dd/hh:mm:ss
-ts<time> Set the Exif internal time to <time>. <time> is in the format
yyyy:mm:dd-hh:mm:ss
-ds<date> Set the Exif internal date. <date> is in the format YYYY:MM:DD
or YYYY:MM or YYYY
一个更强大的选项是ExifTool。
Picasa具有此内置功能。工具=>调整日期和时间...。
我使用以下脚本为图像提供一些连续的日期。希望能帮助到你。它期望将包含图像的目录重新命名为参数,即script directory_with_images
#!/bin/bash
HOUR=12
MINUTE=0
DATE=2004:06:20
for file in "$1"/*;
do
exiv2 -v -M"set Exif.Image.DateTime $DATE $(printf %02d $HOUR):$(printf %02d $MINUTE):00" "$file"
exiv2 -v -M"set Exif.Photo.DateTimeDigitized $DATE $(printf %02d $HOUR):$(printf %02d $MINUTE):00" "$file"
exiv2 -v -M"set Exif.Photo.DateTimeOriginal $DATE $(printf %02d $HOUR):$(printf %02d $MINUTE):00" "$file"
#sets file timestamp (i.e. filesystem metadata, not image metadata) as well
exiv2 -v -T "$file"
if [ $MINUTE = 59 ]; then
HOUR=$((HOUR + 1))
MINUTE=0
else
MINUTE=$((MINUTE + 1))
fi
# this would rename the file as well
#new_path=`pwd`/new_filename$(printf %02d $HOUR)$(printf %02d $MINUTE).jpg
#cp "$file" "$new_path"
done
Picasa 3是Google提供的免费照片管理工具,它可以做到这一点,并且非常好且快捷。
在Picasa中,选择“查看”菜单>“属性”以显示“属性”窗格。
选择包含照片的文件夹,它们将显示为缩略图的集合。
选择您要更新的缩略图。要决定要批量更新,可以将它们全部设置为相同的新日期时间,也可以更改第一个日期时间,其余所有时间将以相同的时间偏移。
在“属性”窗格中,右键单击“相机日期”字段,然后从上下文菜单中选择“调整日期和时间...”。“调整照片日期”对话框将打开,显示第一张照片的当前相机日期。
根据需要编辑相机日期和时间。如果只想将上午更改为pm,反之亦然,只需选择时间中的“上午”部分,然后根据需要键入“ a”或“ p”即可。无需键入整个“ am”或“ pm”。
如果选择了多个缩略图进行更新,则有两个选项:“按相同数量调整所有照片日期”或“将所有照片设置为相同的日期和时间”。选择适当的一个。然后单击确定。
所有选定照片的EXIF日期将被更新。
另外,Ubuntu上的Shotwell Photo Manager(当前的13.10版默认照片管理器)具有一个菜单,用于调整所选照片的日期/时间。结合上次导入过滤器,您可以轻松地调整日期和时间错误的相机中导入的照片。