zoukankan      html  css  js  c++  java
  • ImageMagick 提取四通道png图片的alpha及magick使用

    1、convert "rgba.png" -alpha extract "result.png"
    提取alpha通道
    2、查看图片信息
    convert some_pic.png -verbose info:
    Image: rgb.png
      Format: PNG (Portable Network Graphics)
      Class: DirectClass
      Geometry: 500x400+0+0
      Resolution: 72x72
      Print size: 6.94444x5.55556
      Units: Undefined
      Type: Palette
      Endianess: Undefined
      Colorspace: RGB
      Depth: 8-bit
      Channel depth:
        red: 1-bit
        green: 1-bit
        blue: 8-bit
      Channel statistics:
        red:
          min: 0 (0)
          max: 0 (0)
          mean: 0 (0)
          standard deviation: 0 (0)
          kurtosis: 0
          skewness: 0
        green:
          min: 0 (0)
          max: 0 (0)
          mean: 0 (0)
          standard deviation: 0 (0)
          kurtosis: 0
          skewness: 0
        blue:
          min: 0 (0)
          max: 38 (0.14902)
          mean: 1.93724 (0.00759702)
          standard deviation: 8.05433 (0.0315856)
          kurtosis: 14.5367
          skewness: 4.02498
      Image statistics:
        Overall:
          min: 0 (0)
          max: 38 (0.14902)
          mean: 0.48431 (0.00189925)
          standard deviation: 4.1136 (0.0161318)
          kurtosis: 72.8265
          skewness: 8.57842
      Histogram:
        188701: (  0,  0,  0) #000000 black
          1829: (  0,  0, 22) #000016 rgb(0,0,22)
          1265: (  0,  0, 28) #00001C rgb(0,0,28)
          8205: (  0,  0, 38) #000026 rgb(0,0,38)
      Rendering intent: Undefined
      Interlace: None
      Background color: white
      Border color: rgb(223,223,223)
      Matte color: grey74
      Transparent color: black
      Page geometry: 500x400+0+0
      Dispose: Undefined
      Iterations: 0
      Compression: Zip
      Orientation: Undefined
      Properties:
        date:create: 2020-12-04T16:44:02+08:00
        date:modify: 2020-12-04T16:44:02+08:00
        signature: 608df3d93dfa3f35e9baeb207f4fecba7414ae2f381162ed4913fc7c075f5015
        Software: APNG Assembler 2.91
      Artifacts:
        verbose: true
      Tainted: False
      Filesize: 7.04kb
      Number pixels: 195kb
      Version: ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP http://www.imagemagick.org

    3、提取rgb通道

    convert  rose.png -fx R channel_red.gif
    convert  rose.png -fx G channel_green.gif
    convert  rose.png -fx B channel_blue.gif

    4、合并rgb通道图片

    convert  separate_red.gif separate_green.gif separate_blue.gif 
               -combine -set colorspace sRGB rose_combined.gif
     
  • 相关阅读:
    Codeforces Round #747 比赛记录(vp)
    神秘姿势:把 K(2n) 分解成 2n-1 组完美匹配
    Codeforces Round #745 比赛记录(vp)
    NOIP Camp #2 比赛记录
    数论 专题整理
    Java基础之流程控制语句
    Java基本类型
    开启学科模式
    Strange Queries (莫队+容斥原理)
    洛谷P1993 小K的农场
  • 原文地址:https://www.cnblogs.com/zl1991/p/14086563.html
Copyright © 2011-2022 走看看