⚠️ 这是一个非官方翻译网站,与 ImageMagick Studio LLC 无关。准确信息请参阅原文(https://imagemagick.org/display/)

display

使用示例 • 选项一览

使用 display 程序可以在任意 X 服务器上显示图像或图像序列。关于如何组织 display 命令,请参阅命令行处理,或查看下面的命令使用示例。

使用示例

为说明 display 命令的实用性与易用性,下面列举几个示例。首先,让我们显示一张 JPEG 格式的图像:

magick display rose.jpg

要将石板(slate)纹理平铺到根窗口上,使用:

magick display -size 1280x1024 -window root slate.png

要显示所有 JPEG 图像的可视化目录,使用:

magick display 'vid:*.jpg'

display 程序默认使用 X 屏幕的分辨率。要以矢量格式预期的尺寸显示,请覆盖默认分辨率:

magick display -density 72 drawing.svg

更多 display 的使用示例可在 Examples of ImageMagick Usage 中找到。

选项一览

display 命令可识别以下选项。点击某个选项可查看其工作方式的详细说明。

选项 说明
-alpha 对 alpha 通道指定 on, activate, off, deactivate, set, opaque, copy, transparent, extract, background, shape
-antialias 移除像素锯齿
-authenticate value 使用此密码解密图像
-backdrop 将图像居中显示在背景上
-background color 背景色
-border geometry 用彩色边框环绕图像
-bordercolor color 边框颜色
-channel type 将选项应用于选定的图像通道
-clip 沿 8BIM 配置文件中的第一条路径裁剪
-clip-path id 沿 8BIM 配置文件中的命名路径裁剪
-coalesce 合并图像序列
-colormap type Shared 或 Private
-colors value 图像中期望使用的颜色数
-colorspace type 设置图像色彩空间
-comment string 用注释标注图像
-compress type 图像压缩类型
-contrast 增强或降低图像对比度
-crop geometry 裁剪图像的期望尺寸与位置
-debug events 显示大量调试信息
-decipher filename 将加密像素转换为明文
-define format:option 定义一个或多个图像格式选项
-delay centiseconds 暂停后再显示下一张图像
-density geometry 图像的水平与垂直密度
-depth value 图像位深度
-despeckle 降低图像中的斑点噪声
-display server 从此 X 服务器获取图像或字体
-dispose method 图层处置方法
-dither method 对图像应用误差扩散
-edge radius 应用滤镜检测图像中的边缘
-endian type 图像的字节序(MSB 或 LSB)
-enhance 应用数字滤镜以改善噪声较多的图像
-equalize 对图像执行直方图均衡化
-extract geometry 从图像中提取区域
-filter type 调整图像尺寸时使用此滤镜
-flatten 将图像序列平铺合并为一张
-flip 沿垂直方向翻转图像
-flop 沿水平方向翻转图像
-frame geometry 用装饰性边框环绕图像
-fuzz distance 此距离内的颜色视为相同
-gamma value 伽马校正的级别
-geometry geometry 图像的期望尺寸或位置
-gravity geometry 背景的水平与垂直放置
-help 打印程序选项
-identify 识别图像的格式与特性
-immutable type 禁止图像编辑
-interlace type 图像隔行扫描方案的类型
-interpolate method 像素颜色插值方法
-label name 为图像分配标签
-limit type value 像素缓存资源上限
-log format 调试信息的格式
-map filename 将图像颜色变换以匹配此颜色集
-mattecolor color 框架颜色
-monitor 监视进度
-monochrome 将图像转换为黑白
-negate 将每个像素替换为其补色
-normalize 将图像扩展至整个颜色范围
-page geometry 图像画布的尺寸与位置(设置)
-profile filename 添加、删除或应用图像配置文件
-quantize colorspace 在此色彩空间中减少图像颜色
-quiet 抑制所有警告信息
-raise value 提亮/压暗图像边缘以营造立体效果
-regard-warnings 重视警告信息
-remote command 在远程 display 进程中执行命令
-resample geometry 更改图像的分辨率
-resize geometry 调整图像尺寸
-respect-parentheses 设置在括号边界之前保持有效
-roll geometry 沿垂直或水平方向滚动图像
-rotate degrees 对图像应用 Paeth 旋转
-sample geometry 使用像素采样缩放图像
-sampling-factor geometry 水平与垂直采样因子
-scene value 图像场景编号
-seed value 为新的伪随机数序列设定种子
-segment values 对图像进行分段
-set attribute value 设置图像属性
-sharpen geometry 锐化图像
-size geometry 图像的宽度与高度
-strip 从图像中剥离所有配置文件与注释
-thumbnail geometry 创建图像的缩略图
-transparent-color color 透明色
-black-threshold value 将所有低于阈值的像素强制为黑色
-trim 修剪图像边缘
-update seconds 检测图像文件被修改并重新显示
-verbose 打印图像的详细信息
-version 打印版本信息
-virtual-pixel method 图像边界外像素的访问方法
-visual 使用此可视类型显示图像
-window id 将图像显示到此窗口的背景
-window-group id 当此窗口 ID 被销毁时退出程序
-write filename 将图像写入此文件