2014年6月30日月曜日

ImageMagickのコマンドラインツールで画像の情報をさくっと見てみる

環境はCentOS 6系 ImageMagick入れる
$ sudo yum install ImageMagick
identifyコマンドでチェック
$ identify -verbose newwindow.png

Image: newwindow.png
  Format: PNG (Portable Network Graphics)
  Class: DirectClass
  Geometry: 11x9+0+0
  Resolution: 72x72
  Print size: 0.152778x0.125
  Units: Undefined
  Type: PaletteMatte
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
    alpha: 1-bit
  Channel statistics:
    red:
      min: 117 (0.458824)
      max: 255 (1)
      mean: 207.97 (0.815567)
      standard deviation: 58.2078 (0.228266)
      kurtosis: -1.58905
      skewness: -0.506753
    green:
      min: 0 (0)
      max: 255 (1)
      mean: 170.879 (0.670113)
      standard deviation: 108.467 (0.425361)
      kurtosis: -1.28129
      skewness: -0.68968
    blue:
      min: 0 (0)
      max: 255 (1)
      mean: 170.879 (0.670113)
      standard deviation: 108.467 (0.425361)
      kurtosis: -1.28129
      skewness: -0.68968
    alpha:
      min: 0 (0)
      max: 255 (1)
      mean: 167.424 (0.656566)
      standard deviation: 121.088 (0.474855)
      kurtosis: -1.56516
      skewness: 0.659425
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 159.326 (0.624807)
      standard deviation: 111.088 (0.435638)
      kurtosis: -1.49685
      skewness: -0.508195
  Alpha: rgba(255,255,255,0)   #FFFFFF00
  Histogram:
        16: (117,117,117,255) #757575 grey46
        24: (153,  0,  0,255) #990000 rgba(153,0,0,1)
        34: (255,255,255,  0) #FFFFFF00 rgba(255,255,255,0)
        25: (255,255,255,255) #FFFFFF white
  Rendering intent: Undefined
  Gamma: 0.45
  Interlace: None
  Background color: white
  Border color: rgba(223,223,223,1)
  Matte color: grey74
  Transparent color: none
  Page geometry: 11x9+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2014-06-30T19:11:35+09:00
    date:modify: 2014-06-30T19:11:35+09:00
    signature: 2c79c5cc4298064485707a3e8c1e0ceba9f7241dd7366ff9a9dcb505a8b14936
    Software: Adobe ImageReady
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 220b
  Number pixels: 99b
  Version: ImageMagick 6.5.4-7 2014-02-10 Q16 OpenMP http://www.imagemagick.org
ずらーっとでてくる 例えば色空間(RGBとかCMYKとか)だったら
identify -verbose newwindow.png |grep Colorspace
  Colorspace: RGB
Colorspaceを見ればよいね。

0 件のコメント:

コメントを投稿