imagemagick - GraphicsMagick 中的量子是什么意思

标签 imagemagick graphicsmagick

GM has build option quantum which defines the bitdepth to use when reading an image. Building GM with high quantum means that images of smaller bitdepth will take a lot more memory.

这里的量子是什么?谁能给我一些关于这方面的资源?

最佳答案

这是一个构建时设置,这意味着您需要重新编译 GraphicsMagick 才能更改它。

如果您使用 Q8 进行构建,则图像中的每个像素都可以具有 2^8 个唯一值,即 256 级灰度。

如果您使用 Q16 构建,每个像素可以有 2^16 个唯一值 - 即 65,536 种灰色阴影。

因此,使用更大的量子设置,从好的方面来说,您将获得更平滑的梯度和更少的舍入误差,例如。缺点是您的处理可能需要更长的时间(取决于 CPU)并且需要更多的 RAM 来存储它。

您可以通过以下方式检查您当前的设置:

gm identify version

示例输出

GraphicsMagick 1.3.27  Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2017 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

Feature Support:
  Native Thread Safe       yes
  Large Files (> 32 bit)   yes
  Large Memory (> 32 bit)  yes
  BZIP                     yes
  DPS                      no
  FlashPix                 no
  FreeType                 yes
  Ghostscript (Library)    no
  JBIG                     no
  JPEG-2000                no
  JPEG                     yes
  Little CMS               no
  Loadable Modules         yes
  OpenMP                   no
  PNG                      yes
  TIFF                     yes
  TRIO                     no
  UMEM                     no
  WebP                     no
  WMF                      no
  X11                      no
  XML                      yes
  ZLIB                     yes

Host type: x86_64-apple-darwin17.3.0

Configured using the command:
  ./configure  '--prefix=/usr/local/Cellar/graphicsmagick/1.3.27' '--disable-dependency-tracking' '--enable-shared' '--disable-static' '--with-modules' '--without-lzma' '--disable-openmp' '--with-quantum-depth=16' '--without-gslib' '--with-gs-font-dir=/usr/local/share/ghostscript/fonts' '--without-x' '--without-lcms2' 'CC=clang' 'CXX=clang++'

Final Build Parameters:
  CC       = clang
  CFLAGS   = -g -O2 -Wall -D_THREAD_SAFE
  CPPFLAGS = -I/usr/local/opt/freetype/include/freetype2 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2
  CXX      = clang++
  CXXFLAGS = -D_THREAD_SAFE
  LDFLAGS  = -L/usr/local/opt/freetype/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib
  LIBS     = -lfreetype -lbz2 -lz -lltdl -lm -lpthread

第一行有 Q16,意思是我的 Quantum 是 16。

关于imagemagick - GraphicsMagick 中的量子是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48909026/

相关文章:

linux - 光栅制图转换库。 'Unprojected' 到任何

node.js - Node 的异步 GraphicsMagick

ubuntu - ImageMagick 在转换为 png 时未应用 svg 过滤器

使用 MagickWand C API 自定义浮雕

ImageMagick,Q8 与 Q16 的实际含义是什么?

R:将 3D 矩阵转换/读取为 'magick' 对象,反之亦然

perl - 图片::草莓 Perl 5.12 上的 Magick

node.js - Node gm - 调整图像大小并保持纵横比?

javascript - 将 FFMPEG 导入 Graphics Magick

python - 如何在 wxpython gui 中显示graphicsmagick 图像?