LoginSignup
1
1

More than 5 years have passed since last update.

Imageioでの初歩的なエラーを解決したときのお話

Last updated at Posted at 2018-06-12

間違った知識がありましたら、遠慮なく教えてください。

概要

  • pythonを利用してHDR画像を読み込み
  • imageioのエラーの対処法

本編

新環境で、HDR画像を読み込もうとした時の話。
HDR画像のような特殊な拡張子のファイルは、PIL(Pillow)やscipyなどのPythonで画像を扱うときによく使われているようなものでは読み込めないようなので、imageioを利用することにした。

遭遇したエラー

  • 実行内容
hdr.py
import imageio
hdr = imageio.imread('sample.hdr')
  • エラー
Error : could not find a format to read the specified file in mode 'i'

そんなformatのものは知らないとか言われてしまった。

解決作

必要なライブラリをインストールできていなかっただけのようである。
今回はfreeimageというライブラリをインストールしたら解決しました。
公式(imageio)

1
1
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
1
1