web-dev-qa-db-ja.com

EXIFデータの撮影日情報を一括変更するにはどうすればよいですか?

F-Spotを使用して画像を管理しています。画像の1つのセットで、日付がどういうわけか乱雑になり、それらすべてが2007年9月1日としてマークされています。撮影日情報を別の日付に変更したいのですが。これどうやってするの?

32
Eugene M

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 です。

26
therefromhere

Picasaにはこの機能が組み込まれています。ツール=>日付と時刻の調整...

4
user28515

exiv2 は、exifデータを操作するコマンドラインツールです。サポートされている画像形式は、JPEG、Canon CRW、Canon THMです。 PNGは読み取り専用です。

ファイルの日付をexifの日付に設定する場合は、exiv2で次のオプションを使用できます。

-tファイルの名前を変更することに加えて、Exif createタイムスタンプに従ってファイルのタイムスタンプを設定します(-kを上書きします)。このオプションは、「名前変更」アクションでのみ使用されます。

3

ここに私が必要なものがあります

古い日付に一定のオフセットを追加するには

exiv2 ad -a -3:17 *.JPG

名前を%Y%m%d_%H%M%Sに変更するには

exiv2 mv *.JPG

他のフォーマットとオプションは man pages で指定されています。

2
Johu

FastStone Image Viewerを試す[ 機能ダウンロードリンク1ダウンロードリンク2 ]

a screenshot

2
Lazer

次の無料ツールを試すことができます: Exifer

1
splattne

次のスクリプトを使用して、画像にいくつかの連続した日付を与えます。それが役に立てば幸い。これは、引数としてi.e 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
1
sup

iPhotoとApertureにはどちらもタイムシフトオプションがあり、通常は新しいタイムゾーンにいる場合や、時計が間違っている場合に使用できます。ファイルを未編集のままにする(アプリのデータベースのみを更新する)か、ファイルを編集できます。明らかにF-Spotはこれを借りる必要があります。

0
dlamblin

Exiftool:コマンドラインが遅い。 (これはPerlで書かれているので、そこに独自の結論を導き出してください。)

Exiferは、EXIFブロックだけでなく、ファイルに1つまたは2つの空のタグを作成します。また、他のツールによって記述されたいくつかのタグを削除します。 1年以上使用していないので、どれを使用するか特定できません。

FastStoneのもの、imxは遅すぎて、1〜2日以上インストールを維持できません。

私の投票はHrです。 Weinzerlの提案:Exiv2。

BZT

0
SilversleevesX

Picasa (Googleの無料の写真管理ツール)がこれを実行します。

Picasaで、[表示]メニュー> [プロパティ]を選択して、[プロパティ]ペインを表示します。

写真が含まれているフォルダを選択すると、サムネイルのコレクションとして表示されます。

更新するサムネイルを選択します。どれをバッチとして更新するかを決定するには、それらをすべて同じ新しい日時に設定するか、最初のものを変更して残りをすべて同じ量だけタイムシフトすることができます。

[プロパティ]ペインで[カメラの日付]フィールドを右クリックし、コンテキストメニューから[日付と時刻の調整...]を選択します。写真の日付の調整ダイアログが開き、最初の写真の現在のカメラの日付が表示されます。

必要に応じてカメラの日付と時刻を編集します。午前を午後に、またはその逆に変更する場合は、「午前」を選択します。時間の一部として、必要に応じて「a」または「p」を入力します。 「a.m.」全体を入力する必要はありません。または「午後」事。

更新用に複数のサムネイルを選択した場合、「すべての写真の日付を同じ量だけ調整する」または「すべての写真を同じ日付と時刻に設定する」という2つのオプションがあります。適切な方を選択してください。次にOKをクリックします。

選択したすべての写真のEXIF日付が更新されます。

0
SimonTewsi

また、Ubuntuの Shotwell Photo Manager (バージョン13.10の現在のデフォルトの写真マネージャー)には、選択した写真の menu Adjust date/time があります。最後のインポートフィルターと組み合わせると、間違った日付と時刻のカメラからインポートした写真を簡単に調整できます。

0
pablo.bueti