LoginSignup
0
0

More than 5 years have passed since last update.

Windowsファイルエクスプローラのプレビュー表示は、PNGのgAMAチャンクに対応していない

Last updated at Posted at 2018-06-05

環境

  • Windows10 HOME
    • バージョン:1803
    • OSビルド:17134.48
    • Microsoftフォト 2018.18041.15210.0
  • Windows7 Home Pentium
    • バージョン:6.1
    • ビルド:7601(Service Pack 1)
  • ImageMagick 7.0.4-10 Q16 x64 2017-02-18

背景

ImageMagickのconvertコマンドを使って、PNGのgAMAチャンクを変更しました。

# 元の画像のgAMAチャンクの値
$ identify -verbose original.png
...
  Properties:
    png:gAMA: gamma=0.45455 (See Gamma, above)

$ # ガンマ補正値を"3"に設定する
$ convert original.png +gamma 3 converted.png
$ # 画像の詳細情報を出力する
# 元の画像のgAMAチャンクの値
$ identify -verbose converted.png
...
  Properties:
    png:gAMA: gamma=3 (See Gamma, above)

変換後の画像はガンマ補正値が"3"で、元の画像より薄く表示されます。
(Firefoxで「薄く表示されること」を確認した)

original.png

converted.png

起こったこと

Windows10のファイルエクスプローラでプレビュー表示(特大アイコン)すると、"converted.png"は"origina.png"のプレビュー表示と同じでした。

image

Windowsフォトで"converted.png"を開いたあと、ファイルエクスプローラを更新したら、"converted.png"の色が薄くなりました。

image

image

gAMAチャンクに対応しているかどうか

様々なソフトで、gAMAチャンクが対応しているかどうかを調べました。

OS ソフト 結果
Windows7 ペイント NG
Windows7 フォトビューア NG
Windows7 ファイルエクスプロラーのプレビュー表示 NG
Windows10 ペイント NG
Windows10 Microsoftフォト OK
Windows10 ファイルエクスプロラーのプレビュー表示 NG/OK(上述参照)
Xubuntu ristretto 0.8.0 NG
Xubuntu Eye of GNOME Image Viewer 3.18.2 OK
Xubuntu Thunar 1.6.11 プレビュー表示 NG
macOS High Sierra Finder 10.13.5 プレビュー表示 OK

まとめ

  • プリインストールされているWindows関係の画像編集/閲覧ソフトでは、PNGのgAMAチャンクに対応しているものが少ない
  • Microsoftフォトは、gAMAチャンクに対応している
  • Windows10のファイルエクスプロラーのプレビュー表示は、Microsoftフォトに影響する

分からないこと

なぜ、Microsoftフォトで開くと、ファイルエクスプローラのプレビュー表示が変わるのでしょうか?

補足

ImageMagickの+gammaオプションの説明

Use +gamma value to set the image gamma level without actually adjusting the image pixels. This option is useful if the image is of a known gamma but not set as an image attribute (e.g. PNG images). Write the "file gamma" which is the reciprocal of the display gamma; e.g., if your image is sRGB and you want to write a PNG gAMA chunk, use

https://www.imagemagick.org/script/command-line-options.php#gamma 引用

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0