EXIF方向が画像を水平に強制しないのはなぜですか? [コピー]

EXIF方向が画像を水平に強制しないのはなぜですか? [コピー]

画像の方向の安定性を維持しようとしていますが、Debian Image Viewer / LaTeXとImage Viewerとは異なります。このようにしましたが、誤って配置された画像の向きには何の影響もありません。手動で調整しても-Orientation=[1234]役に立ちません。

exiftool -Orientation=1 -n *.jpg

図1画像ビューア(Shotwell、...)で開いた同じ画像の出力とDebian Spaceのレビュー(LaTeXの同じ出力)

ここに画像の説明を入力してください。

convert masi.jpg -rotate 90 masi-rotated.jpg最初は画像の向きが間違っていると思っていましたが、そうしても相対的な違いがそのまま維持されるため、そうではありません。

EXIF情報

画像の位置が間違っています。方向は90度またはその倍数です。

$ exiftool 28.jpg 
ExifTool Version Number         : 9.74
File Name                       : 28.jpg
Directory                       : .
File Size                       : 69 kB
File Modification Date/Time     : 2016:11:29 11:59:08+02:00
File Access Date/Time           : 2016:11:29 12:07:17+02:00
File Inode Change Date/Time     : 2016:11:29 12:06:29+02:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Exif Byte Order                 : Little-endian (Intel, II)
Orientation                     : Rotate 270 CW
Software                        : Shotwell 0.20.1
Color Space                     : sRGB
Exif Image Width                : 425
Exif Image Height               : 707
XMP Toolkit                     : XMP Core 4.4.0-Exiv2
Image Width                     : 425
Image Height                    : 707
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 425x707

両方のビューで(予想どおり)画像の正しい位置を指定する

$ exiftool 27.jpg 
ExifTool Version Number         : 9.74
File Name                       : 27.jpg
Directory                       : .
File Size                       : 66 kB
File Modification Date/Time     : 2016:11:29 11:58:53+02:00
File Access Date/Time           : 2016:11:29 12:13:36+02:00
File Inode Change Date/Time     : 2016:11:29 12:07:46+02:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Exif Byte Order                 : Little-endian (Intel, II)
Orientation                     : Horizontal (normal)
Software                        : Shotwell 0.20.1
Color Space                     : sRGB
Exif Image Width                : 842
Exif Image Height               : 504
XMP Toolkit                     : XMP Core 4.4.0-Exiv2
Image Width                     : 842
Image Height                    : 504
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 842x504

Debian: 8.5
GNOME: 3.14

ベストアンサー1

28.jpgにはEXIFタグ「方向:時計回り270度」があり、逆に29.jpgには「水平(一般)」があります。画像を回転してもconvertEXIF情報は変わらないので、EXIF情報を尊重する視聴者はそうでない視聴者とはまだ異なって見えるでしょう。

変更タグを使用できますexiftool。これを行うには、exiftoolまず次の情報を提供するいくつかのオプションを呼び出すことをお勧めします。

$ exiftool -g -n -arg 28.jpg
.
.
-EXIF:Orientation=2
.
.

(この値は異なる場合があります)。これは言う:

-g:グループと表示ラベルグループ

-n:テキストの代わりに数値を表示します。

-arg:ラベルを引数として表示します。

これでラベルを「方向:水平(一般)」に変更できるようになりました。

exiftool -n -EXIF:Orientation=1

-n を定義して、Exiftool が引数が数値であることを確認し、グループ名を定義して、Exiftool がラベルを見つけることができる場所を知ることができるようにする必要があります。

詳細については、次を参照してください。Exif方向タグ

おすすめ記事