如何在Linux用终端修改hosts用ImageMagick转换和修改图像

imagemagick convert的简单用法_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
imagemagick convert的简单用法
&&imagemagick convert的简单用法
阅读已结束,下载文档到电脑
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,方便使用
还剩6页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢ImageMagick 入门:使用命令行来编辑图片
ImageMagick 入门:使用命令行来编辑图片
互联网传媒
ImageMagick 不仅仅是一个图像查看器,它还提供了大量的图像编辑工具和选项。本教程将详细介绍如何在 ImageMagick 中使用 display 命令和其他命令行工具。 -- Greg Pittman-display 命令 …… 08%-convert 命令 …… 45%-montage 命令 …… 77%作者: Greg Pittman译者: geekpi了解使用此轻量级图像编辑器查看和修改图像的常见方法。在最近一篇关于轻量级图像查看器[1]的文章中,作者 Scott Nesbitt 提到了 display,它是 ImageMagick[2] 中的一个组件。ImageMagick 不仅仅是一个图像查看器,它还提供了大量的图像编辑工具和选项。本教程将详细介绍如何在 ImageMagick 中使用 display 命令和其他命令行工具。现在有许多优秀的图像编辑器可用,你可能会想知道为什么有人会选择一个非 GUI 的、基于命令行的程序,如 ImageMagick。一方面,它非常可靠。但更大的好处是,它允许你建立一个以特定的方式编辑大量图像的方式。这篇对于常见的 ImageMagick 命令的介绍应该让你入门。让我们从 Scott 提到的命令开始:display。假设你有一个目录,其中有很多想要查看的图像。使用以下命令开始 display:display *.JPG 这将按照字母数字顺序顺序加载你的 JPG 文件,每张放在一个简单的窗口中。左键单击图像可以打开一个简单的独立菜单(ImageMagick 中唯一的 GUI 功能)。display menu你可以在 display 菜单中找到以下内容:File 包含选项 Open、Next、Former、Select、Save、Print、Delete、New、Visual Directory 和 Quit。 Select 来选择要显示的特定文件,Visual Directory 显示当前工作目录中的所有文件(而不仅仅是图像)。如果要滚动显示所有选定的图像,你可以使用 Next 和 Former,但使用键盘快捷键(下一张图像用空格键,上一张图像用退格)更容易。Edit 提供 Undo、Redo、Cut、Copy 和 Paste,它们只是辅助命令进行更具体的编辑过程。 当你进行不同的编辑功能看看它们做什么时 Undo 特别有用。View 有 Half Size、Original Size、Double Size、Resize、Apply、Refresh 和 Restore。这些大多是不用说明的,除非你在应用其中之一后保存图像,否则图像文件不会更改。Resize 会打开一个对话框,以像素为单位,带有或者不带尺寸限制,或者是百分比指定图片大小。我不知道 Apply 会做什么。Transform 显示 Crop、Chop、Flop、Flip、Rotate Right、Rotate Left、Rotate、Shear、Roll 和 Trim Edges。Chop 使用点击拖动操作剪切图像的垂直或水平部分,将边缘粘贴在一起。了解这些功能如何工作的最佳方法是操作它们,而不是看看。Enhance 提供 Hue、Saturation、Brightness、Gamma、Spiff、Dull、Contrast Stretch、Sigmoidal Contrast、Normalize、Equalize、Negate、Grayscale、Map 和 Quantize。这些是用于颜色和调整亮度和对比度的操作。效果 有 Despeckle、Emboss、Reduce Noise、Add Noise、Sharpen、Blur、Threshold、Edge Detect、Spread、Shade、Raise 和 Segment。这些是相当标准的图像编辑效果。F/X 选项有 Solarize、Sepia Tone、Swirl、Implode、Vignette、Wave、Oil Paint 和 Charcoal Draw,在图像编辑器中也是非常常见的效果。Image Edit 包含 Annotate、Draw、Color、Matte、Composite、Add Border、Add Frame、Comment、Launch 和 Region of Interest。Launch _ 将打开 GIMP 中的当前图像(至少在我的 Fedora 中是这样)。 _Region of Interest 允许你选择一个区域来应用编辑。按下 Esc 取消选择该区域。Miscellany 提供 Image Info、Zoom Image、Show Preview、Show Histogram、Show Matte、Background、Slide Show 和 Preferences。 Show Preview 似乎很有趣,但我努力让它工作。Help 有 Overview、Browse Documentation 和 About Display。 Overview 提供了大量关于 display 的基本信息,并且包含大量内置的键盘快捷键,用于各种命令和操作。在我的 Fedora 中,Browse Documentation 没有作用。虽然 display 的 GUI 界面提供了一个称职的图像编辑器,但 ImageMagick 还提供了 89 个命令行选项,其中许多与上述菜单项相对应。例如,如果我显示的数码相片目录中的图像大于我的屏幕尺寸,我不用在显示后单独调整大小,我可以指定:上面菜单中的许多操作都可以通过在命令行中添加一个选项来完成。但是还有其他的选项在菜单中没有,包括 -monochrome,将图像转换为黑白(不是灰度),还有 -colors,你可以指定在图像中使用多少种颜色。例如,尝试这些:这些操作会创建有趣的图像。试试增强颜色或进行其他编辑后减少颜色。记住,除非你保存并覆盖它们,否则原始文件保持不变。convert 命令有 237 个选项 - 是的, 237 个! - 它提供了你可以做的各种各样的事情(其中一些 display 也可以做)。我只会覆盖其中的几个,主要是图像操作。你可以用 convert 做的两件简单的事情是:第一个命令将单个文件(DSC_0001)从 JPG 转换为 PNG 格式,而不更改原始文件。第二个将对目录中的所有 BMP 图像执行此操作。如果要查看 ImageMagick 可以使用的格式,请输入:我们来看几个用 convert 命令来处理图像的有趣方法。以下是此命令的一般格式:你有多个选项,它们按照从左到右排列的顺序完成。以下是几个简单的选项:monochrome examplecharcoal example-monochrome 选项没有关联的设置,但 -charcoal 变量需要一个相关因子。根据我的经验,它需要一个小的数字(甚至小于 1)来实现类似于炭笔绘画的东西,否则你会得到很大的黑色斑点。即使如此,图像中的尖锐边缘也是非常明显的,与炭笔绘画不同。现在来看看这些:edge and reduced colors example原始图像位于左上方。在第一个命令中,我使用了一个 -edge 选项,设置为 3(见右上角的图像) - 对于我的喜好而言小于它的数字都太精细了。在第二个命令(左下角的图像)中,我们将颜色的数量减少到了 4 个,与原来没有什么不同。但是看看当我们在第三个命令中组合这两个时,会发生什么(右下角的图像)!也许这有点大胆,但谁能预期到从原始图像或任何一个选项变成这个结果?-canny 选项提供了另外一个惊喜。这是另一种边缘检测器,称为“多阶算法”。单独使用 -canny 可以产生基本黑色的图像和一些白线。我后面跟着一个 -negate 选项:convert DSC_0023.jpg -canny 0x1 -negate canny_ship.jpg canny demo这有点极简主义,但我认为它类似于一种笔墨绘画,与原始照片有相当显著的差异。它并不能用于所有图片。一般来说,它对有锐利线条的图像效果最好。不是焦点的元素可能会消失。注意白鹭图片中的背景沙滩没有显示,因为它是模糊的。同样注意下船舶图片,虽然大多数边缘显示得非常好,因为没有颜色,我们失去了图片的整体形象,所以也许这可以作为一些数字着色,甚至在印后着色的基础。最后,我想谈一下 montage (蒙太奇)命令。我已经在上面展示了这个例子,我将单个图像组合成复合图片。这是我如何生成炭笔的例子(请注意,它们都在一行): -resize 25% -shadow -title 'charcoal demo' charcoal_demo.jpg -label 选项会在每个图像下方标记它的文件名(%f)。不用 -geometry 选项,所有的图像将是缩略图大小(120 像素宽),+10+10 负责边框大小。接下来,我调整了整个最终组合的大小(-resize 25%),并添加了一个阴影(没有设置,因此是默认值),最后为这次 montage 操作创建了一个标题(-title)。你可以将所有图像名称放在最后,最后一个图像的名称将是 montage 操作所保存的文件名。这可用于为命令及其所有选项创建别名,然后我可以简单地键入该别名、输入适当的文件名即可。我偶尔会这么做来减少 montage 操作需要输入的命令长度。在 -canny 的例子中,我对 4 张图像进行了蒙太奇操作。我添加了 -tile 选项,确切地说是 -tile 2x,它创建了有两列的蒙太奇。我可以指定一个 matrix、-tile 2x2 或 -tile x2 来产生相同的结果。ImageMagick 还有更多可以了解,所以我打算写更多关于它的文章,甚至可能使用 Perl[3] 脚本运行 ImageMagick 命令。ImageMagick 具有丰富的文档[4],尽管该网站在示例或者显示结果上还不足,我认为最好的学习方式是通过实验和更改各种设置和选项来学习。(题图: )作者简介:Greg Pittman - Greg 是肯塔基州路易斯维尔的一名退休的神经科医生,对计算机和程序设计有着长期的兴趣,从 1960 年代的 Fortran IV 开始。当 Linux 和开源软件相继出现时,他开始学习更多,并最终做出贡献。他是 Scribus 团队的成员。作者:Greg Pittman[5] 译者:geekpi 校对:wxy本文由 LCTT 原创编译,Linux中国 荣誉推出
本文仅代表作者观点,不代表百度立场。系作者授权百家号发表,未经许可不得转载。
互联网传媒
百家号 最近更新:
简介: 互联网传媒捕捉热点互联网资讯
作者最新文章linux下图片处理工具ImageMagick使用方法
图片在网站所占的比重越来越重。更好的优化图片可以提高网站速度。减少宽带流量。
ImageMagick
是一个用来创建、编辑、合成图片的软件。它可以读取、转换、写入多种格式的图片。图片切割、颜色替换、各种效果的应用,图片的旋转、组合,文本,直线,
多边形,椭圆,曲线,附加到图片伸展旋转。ImageMagick是免费软件:全部源码开放,可以自由使用,复制,修改,发布。支持大多数的操作系统。
1.对用户上传图片进行缩放&
对于用户自己上传的图片不能简单的
用css限制大小,因为这样每次加载图片时候还是会加载整幅大图。占用多余的宽带,并且影响页面加载速度。应该根据实际显示需要进行缩放。比如我想要用户
相册里的图片大小不能超过500x300:&
用ImageMagick处理起来很简单
convert -resize
"500x300&" input.jpg& output.jpg
#如果图片比500x300小就保持原样,以防小图片被放大失真。
2.生成不同比例缩略图
一般相册等应用,都会提供缩略图和预览图,这些缩略图同样不能简单的用css来限制大小,要为每个图片生成不同比例的预览图。
3.去除多余信息
Exif信息是数码相机在拍摄过程中采集的一系列信息,这些信息放置在我们熟知的jpg文件的头部,也就是说Exif信息是镶嵌在JPEG图像文件格式内
的一组拍摄参数,主要包括摄影时的光圈、快门、ISO、日期时间等各种与当时摄影条件相关的讯息,相机品牌型号,色彩编码,拍摄时录制的声音以及全球定位
系统(GPS)等信息。简单的说,它就好像是傻瓜相机的日期打印功能一样,只不过Exif信息所记录的资讯更为详尽和完备。不过,具有Exif信息的
JPEG图像文件要比普通的JPEG文件略大一点。还有就是像PS这种软件处理过的图片会有“program
comments”。如果不是专业的摄影类网站,这些信息是没有用的,可以去掉:
convert -strip input.jpg
output.jpg
4.调节压缩比
大多时候,我们的网站并不需要那么清晰的图片,适量调节JPG图片的压缩比会减少图片大小,肉眼并不会分辨出质量被压缩后的图片。通常75%是最佳比例。
convert -quality 75% input.jpg
output.jpg
上面几个步骤可以一次搞定:
convert -resize "500x300" -strip
-quality 75% input.jpg output.jpg
上面说的都是针对JPG格式的处理方式,下面说一下BMP,GIF,PNG等格式的处理。
对于BMP直接转成JPG就可以了。再按照上面的方式处理。
而GIF和PNG貌似有些特殊。GIF的一些特性(动画效果,透明等)是
JPG没有的,可以根据实际情况选择转或不转,如果转换成jpg,取第一帧只需要这样:
convert -format jpg input.gif
PNG也可以通过减少PNG图片color数量的办法达到压缩的目的。但是这种办法压缩出来的图像可以明显看出来失真,而且呈锯齿状。
对于真实世界的PNG图片(通常指照片),一般先转换成JPG,再通过上面的办法来压缩。
但是要注意一点,透明或半透明的PNG图片在转换成JPG时透明部分会变成黑色。。。建议做用户头像时候不要转成JPG。。很难看~~~
本人头像就是深受毒害。。
关于图片扩展名
发现大部分网站喜欢把用户上传的图片(头像,相册等)都统一转成特定格式(一般都是
jpg)。这样做的潜在弊端就是在用像ImageMagick这样的软件处理的时候会根据扩展名做隐式格式转换。
个人觉得在保存图片的时候不加扩展名处理起来更灵活一些。
注:把上面的命令行用mini_magick改写用到rails里很容易的。mini_magick本质就调用系统命令行嘛~~
本文所说的都是对用户上传的图片处理,对网站自身的图片(header,banner等)处理《Even Faster
Websites》一书第十章里面写的很详细了:
/modules.php?name=Sections&op=viewarticle&artid=756
更多ImageMagick用法:
http://www.imagemagick.org/script/index.php
convert命令格式:&-resize
widthxheight{%} {@} {!} {&} {&}
1.&默认时,宽度和高度表示要最终需要转换图像的最大尺寸,同时Convert会控制图片的宽和高,保证图片按比例进行缩放。
如:convert -resize 600&600 src.jpg dst.jpg
转换后的dst.jpg的图片大小(宽度为600,而高度已经按比例调整为450).
2.如果需要转换成600&600,而图片无需保持原有比例,可以在宽高后面加上一个感叹号!.
如:convert -resize 600&600! src.jpg dst.jpg
3. 只指定高度,图片会转换成指定的高度值,而宽度会按原始图片比例进行转换。
如:convert -resize 400 src.jpg dst.jpg
转换后的dst.jpg的图片大小(宽度为400,而高度已经按比例调整为300),和例1有点类似。
4.&默认都是使用像素作为单位,也可以使用百分比来形象图片的缩放。
如:convert -resize 50%x100%! src.jpg dst.jpg
或者convert -resize 50%x100% src.jpg
此参数只会按你的比例计算后缩放,不保持原有比例。(结果尺寸为100&150)
5.使用 @ 来制定图片的像素个数。
如:convert -resize “10000@” src.jpg dst.jpg
此命令执行后,dst.jpg图片大小为(115&86),图片保持原有比例(115&86= 9080
& 10000)。
6.当原始文件大于指定的宽高时,才进行图片放大缩小,可使用&命令后缀。
如:convert -resize “100&50&” src.jpg
此命令执行后,dst.jpg图片大小为(67&50),图片保持原有比例。
如:convert -resize “100&50&!” src.jpg
此命令执行后,dst.jpg图片大小为(100&50),图片不保持原有比例。
7.当原始文件小于指定的宽高时,才进行图片放大转换,可使用&命令后缀。
如:convert -resize “100&500&” src.jpg
dst.jpg&或者convert -resize
“100&100&!” src.jpg dst.jpg
此命令执行后,dst.jpg和src.jpg大小相同,因为原始图片宽比100大。
如:convert -resize “600&600&” src.jpg
此命令执行后,dst.jpg图片大小为(600&450),图片保持原有比例。
如:convert -resize “600&600&!” src.jpg
此命令执行后,dst.jpg图片大小为(600&600),图片不保持原有比例。
8.使用^命令后缀可以使用宽高中较小的那个值作为尺寸
如:convert -resize “300&300^” src.jpg
此命令执行后,dst.jpg图片大小为(400&300),图片保持原有比例,(300:300 &
200:150,选择高作为最小尺寸)。
如:convert -resize “300&200^” src.jpg
此命令执行后,dst.jpg图片大小为(300&225),图片保持原有比例,(300:200 &
200:150,选择宽作为最小尺寸)。
以下是原图和每个命令方式对应的结果:
convert 0.jpg -resize 100 1.jpg
convert 0.jpg -resize x100 2.jpg
convert 0.jpg -resize 100x100 3.jpg
convert 0.jpg &-thumbnail "100x100^" -gravity
center -extent 100x100 &4.jpg
convert 0.jpg &-thumbnail "150x150^" -gravity
center -extent 100x100 &5.jpg
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。linux 下命令行图片处理工具 ImageMagick - CSDN博客
linux 下命令行图片处理工具 ImageMagick
原文链接:
ImageMagick 的主要命令如下:
注:在终端下直接输入下面命令就可以看到相应命令的用法。
<span style="font-size:18 color:#、convert
转换图像&#26684;式和大小,模糊,裁剪,驱除污点,抖动,临近,图片上画图片,加入新图片,生成缩略图等。
zhancang@ubuntu:~/images$ convert
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
Options include:
-adjoin&&&&&&&&&&&&& join images into a single multi-image file
-affine matrix&&&&&& affine transform matrix
-annotate geometry text
&&&&&&&&&&&&&&&&&&&&&& annotate the image with text
-antialias&&&&&&&&&& remove pixel-aliasing
-append&&&&&&&&&&&&& append an image sequence
-authenticate value decrypt image with this password
-average&&&&&&&&&&&& average an image sequence
-background color&&& background color
-bias value&&&&&&&&& add bias when convolving an image
-black-threshold value
&&&&&&&&&&&&&&&&&&&&&& forces all pixels below the threshold into black
-blue-primary point chromaticity blue primary point
-blur geometry&&&&&& blur the image
-border geometry&&&& surround image with a border of color
-bordercolor color&& border color
-channel type&&&&&&& apply option to select image channels
-charcoal radius&&&& simulate a charcoal drawing
-chop geometry&&&&&& remove pixels from the image interior
-clip&&&&&&&&&&&&&&& clip along the first path from the 8BIM profile
-clip-path id&&&&&&& clip along a named path from the 8BIM profile
-clone index&&&&&&&& clone an image
-coalesce&&&&&&&&&&& merge a sequence of images
-colorize value&&&&& colorize the image with the fill color
-colors value&&&&&&& preferred number of colors in the image
-colorspace type&&&& alternate image colorspace
-combine&&&&&&&&&&&& combine a sequence of images
-comment string&&&&& annotate image with comment
-compose operator&&& set image composite operator
-composite&&&&&&&&&& composite image
-compress type&&&&&& type of pixel compression when writing the image
-contrast&&&&&&&&&&& enhance or reduce the image contrast
-convolve coefficients
&&&&&&&&&&&&&&&&&&&&&& apply a convolution kernel to the image
-crop geometry&&&&&& cut out a rectangular region of the image
-cycle amount&&&&&&& cycle the image colormap
-debug events&&&&&&& display copious debugging information
-define format:option
&&&&&&&&&&&&&&&&&&&&&& define one or more image format options
-deconstruct&&&&&&&& break down an image sequence into constituent parts
-delay value&&&&&&&& display the next image after pausing
-delete index&&&&&&& delete the image from the image sequence
-density geometry&&& horizontal and vertical density of the image
-depth value&&&&&&&& image depth
-despeckle&&&&&&&&&& reduce the speckles within an image
-display server&&&&& get image or font from this X server
-dispose method&&&&& GIF disposal method
-dither&&&&&&&&&&&&& apply Floyd/Steinberg error diffusion to image
-draw string&&&&&&&& annotate the image with a graphic primitive
-edge radius&&&&&&&& apply a filter to detect edges in the image
-emboss radius&&&&&& emboss an image
-encoding type&&&&&& text encoding type
-endian type&&&&&&&& endianness (MSB or LSB) of the image
-enhance&&&&&&&&&&&& apply a digital filter to enhance a noisy image
-equalize&&&&&&&&&&& perform histogram equalization to an image
-evaluate operator value
&&&&&&&&&&&&&&&&&&&&&& evaluate an arithmetic, relational, or logical expression
-extent geometry&&&& set the image size
-extract geometry&&& extract area from image
-family name&&&&&&&& render text with this font family
-fill color&&&&&&&&& color to use when filling a graphic primitive
-filter type&&&&&&&& use this filter when resizing an image
-flatten&&&&&&&&&&&& flatten a sequence of images
-flip&&&&&&&&&&&&&&& flip image in the vertical direction
-floodfill geometry color
&&&&&&&&&&&&&&&&&&&&&& floodfill the image with color
-flop&&&&&&&&&&&&&&& flop image in the horizontal direction
-font name&&&&&&&&&& render text with this font
-format &string&&&&& output formatted image characteristics
-frame geometry&&&&& surround image with an ornamental border
-fuzz distance&&&&&& colors within this distance are considered equal
-fx expression&&&&&& apply mathematical expression to an image channel(s)
-gamma value&&&&&&&& level of gamma correction
-gaussian geometry&& gaussian blur an image
-geometry geometry&& perferred size or location of the image
-green-primary point chromaticity green primary point
-gravity type&&&&&&& horizontal and vertical text placement
-help&&&&&&&&&&&&&&& print program options
-implode amount&&&&& implode image pixels about the center
-insert index&&&&&&& insert last image into the image sequence
-intent type&&&&&&&& type of rendering intent when managing the image color
-interlace type&&&&& type of image interlacing scheme
-label name&&&&&&&&& assign a label to an image
-lat geometry&&&&&&& local adaptive thresholding
-level value&&&&&&&& adjust the level of image contrast
-limit type value&&& pixel cache resource limit
-log format&&&&&&&&& format of debugging information
-loop iterations&&&& add Netscape loop extension to your GIF animation
-map filename&&&&&&& transform image colors to match this set of colors
-mask filename&&&&&& set the image clip mask
-matte&&&&&&&&&&&&&& store matte channel if the image has one
-mattecolor color&&& frame color
-median radius&&&&&& apply a median filter to the image
-modulate value&&&&& vary the brightness, saturation, and hue
-monitor&&&&&&&&&&&& monitor progress
-monochrome&&&&&&&&& transform image to black and white
-morph value&&&&&&&& morph an image sequence
-mosaic&&&&&&&&&&&&& create a mosaic from an image sequence
-motion-blur geometry
&&&&&&&&&&&&&&&&&&&&&& simulate motion blur
-negate&&&&&&&&&&&&& replace every pixel with its complementary color&
-noise radius&&&&&&& add or reduce noise in an image
-normalize&&&&&&&&&& transform image to span the full range of colors
-opaque color&&&&&&& change this color to the fill color
-ordered-dither NxN
&&&&&&&&&&&&&&&&&&&&&& ordered dither the image
-orient type&&&&&&&& image orientation
-page geometry&&&&&& size and location of an image canvas (setting)
-paint radius&&&&&&& simulate an oil painting
-ping&&&&&&&&&&&&&&& efficiently determine image attributes
-pointsize value&&&& font point size
-posterize levels&&& reduce the image to a limited number of color levels
-preview type&&&&&&& image preview type
-profile filename&&& add, delete, or apply an image profile
-quality value&&&&&& JPEG/MIFF/PNG compression level
-quiet&&&&&&&&&&&&&& suppress all error or warning messages
-radial-blur angle&& radial blur the image
-raise value&&&&&&&& lighten/darken image edges to create a 3-D effect
-random-threshold low,high
&&&&&&&&&&&&&&&&&&&&&& random threshold the image
-region geometry&&&& apply options to a portion of the image
-raise value&&&&&&&& lighten/darken image edges to create a 3-D effect
-red-primary point&& chromaticity red primary point
-render&&&&&&&&&&&&& render vector graphics
-repage geometry&&&& size and location of an image canvas
-resample geometry&& change the resolution of an image
-resize geometry&&&& resize the image
-roll geometry&&&&&& roll an image vertically or horizontally
-rotate degrees&&&&& apply Paeth rotation to the image
-sample geometry&&&& scale image with pixel sampling
-sampling-factor geometry
&&&&&&&&&&&&&&&&&&&&&& horizontal and vertical sampling factor
-scale geometry&&&&& scale the image
-scene value&&&&&&&& image scene number
-seed value&&&&&&&&& pseudo-random number generator seed value
-segment values&&&&& segment an image
-separate&&&&&&&&&&& separate an image channel into a grayscale image
-sepia-tone threshold
&&&&&&&&&&&&&&&&&&&&&& simulate a sepia-toned photo
-set attribute value set an image attribute
-shade degrees&&&&&& shade the image using a distant light source
-shadow geometry&&&& simulate an image shadow
-sharpen geometry&&& sharpen the image
-shave geometry&&&&& shave pixels from the image edges
-shear geometry&&&&& slide one edge of the image along the X or Y axis
-sigmodial-contrast geometry
&&&&&&&&&&&&&&&&&&&&&& lightness rescaling using sigmoidal contrast enhancement
-size geometry&&&&&& width and height of image
-solarize threshold negate all pixels above the threshold level
-splice geometry&&&& splice the background color into the image
-spread amount&&&&&& displace image pixels by a random amount
-strip&&&&&&&&&&&&&& strip image of all profiles and comments
-stroke color&&&&&&& graphic primitive stroke color
-strokewidth value&& graphic primitive stroke width
-stretch type&&&&&&& render text with this font stretch
-style type&&&&&&&&& render text with this font style
-support factor&&&&& resize support: & 1.0 is blurry, & 1.0 is sharp
-swap indexes&&&&&&& swap two images in the image sequence
-swirl degrees&&&&&& swirl image pixels about the center
-texture filename&&& name of texture to tile onto the image background
-threshold value&&&& threshold the image
-thumbnail geometry create a thumbnail of the image
-tile filename&&&&&& tile image when filling a graphic primitive
-tint value&&&&&&&&& tint the image with the fill color
-transform&&&&&&&&&& affine transform image
-transparent color&& make this color transparent within the image
-treedepth value&&&& color tree depth
-trim&&&&&&&&&&&&&&& trim image edges
-type type&&&&&&&&&& image type
-undercolor color&&& annotation bounding box color
-units type&&&&&&&&& the units of image resolution
-unsharp geometry&&& sharpen the image
-verbose&&&&&&&&&&&& print detailed information about the image
-version&&&&&&&&&&&& print version information
-view&&&&&&&&&&&&&&& FlashPix viewing transforms
-virtual-pixel method
&&&&&&&&&&&&&&&&&&&&&& virtual pixel access method
-wave geometry&&&&&& alter an image along a sine wave
-weight type&&&&&&&& render text with this font weight
-white-point point&& chromaticity white point
-white-threshold value
&&&&&&&&&&&&&&&&&&&&&& forces all pixels above the threshold into white
-write filename&&&&& write images to this file
By default, the image format of `file' is determined by its magic
number. To specify a particular image format, precede the filename
with an image format name and a colon (i.e. ps:image) or specify the
image type as the filename suffix (i.e. image.ps). Specify 'file' as
'-' for standard input or output.
<span style="font-size:18 color:#、identify
描述一个或较多图像文件的&#26684;式和特性。
<span style="font-size:18 color:#、mogrify
按规定尺寸制作一个图像,模糊,裁剪,抖动等。Mogrify改写最初的图像文件然后写到一个不同的图像文件。
<span style="font-size:18 color:#、composite
根据一个图片或多个图片组合生成图片。
zhancang@ubuntu:~/images$ composite
Usage: composite [options ...] image [options ...] composite [ [options ...] mask ] [options ...] composite
Options include:
-affine matrix&&&&&& affine transform matrix
-authenticate value decrypt image with this password
-blend geometry&&&&& blend images
-blue-primary point chromaticity blue primary point
-channel type&&&&&&& apply option to select image channels
-colors value&&&&&&& preferred number of colors in the image
-colorspace type&&&& alternate image colorspace
-comment string&&&&& annotate image with comment
-compose operator&&& composite operator
-compress type&&&&&& type of pixel compression when writing the image
-debug events&&&&&&& display copious debugging information
-define format:option
&&&&&&&&&&&&&&&&&&&&&& define one or more image format options
-density geometry&&& horizontal and vertical density of the image
-depth value&&&&&&&& image depth
-displace geometry&& shift image pixels defined by a displacement map
-display server&&&&& get image or font from this X server
-dispose method&&&&& GIF disposal method
-dissolve value&&&&& dissolve the two images a given percent
-dither&&&&&&&&&&&&& apply Floyd/Steinberg error diffusion to image
-encoding type&&&&&& text encoding type
-endian type&&&&&&&& endianness (MSB or LSB) of the image
-extract geometry&&& extract area from image
-filter type&&&&&&&& use this filter when resizing an image
-font name&&&&&&&&&& render text with this font
-geometry geometry&& location of the composite image
-gravity type&&&&&&& which direction to gravitate towards
-green-primary point chromaticity green primary point
-help&&&&&&&&&&&&&&& print program options
-interlace type&&&&& type of image interlacing scheme
-label name&&&&&&&&& assign a label to an image
-limit type value&&& pixel cache resource limit
-log format&&&&&&&&& format of debugging information
-matte&&&&&&&&&&&&&& store matte channel if the image has one
-monitor&&&&&&&&&&&& monitor progress
-monochrome&&&&&&&&& transform image to black and white
-negate&&&&&&&&&&&&& replace every pixel with its complementary color&
-page geometry&&&&&& size and location of an image canvas (setting)
-profile filename&&& add ICM or IPTC information profile to image
-quality value&&&&&& JPEG/MIFF/PNG compression level
-quiet&&&&&&&&&&&&&& suppress all error or warning messages
-red-primary point&& chromaticity red primary point
-rotate degrees&&&&& apply Paeth rotation to the image
-repage geometry&&&& size and location of an image canvas (operator)
-resize geometry&&&& resize the image
-sampling-factor geometry
&&&&&&&&&&&&&&&&&&&&&& horizontal and vertical sampling factor
-scene value&&&&&&&& image scene number
-sharpen geometry&&& sharpen the image
-size geometry&&&&&& width and height of image
-stegano offset&&&&& hide watermark within an image
-stereo&&&&&&&&&&&&& combine two image to create a stereo anaglyph
-strip&&&&&&&&&&&&&& strip image of all profiles and comments
-support factor&&&&& resize support: & 1.0 is blurry, & 1.0 is sharp
-thumbnail geometry create a thumbnail of the image
-tile&&&&&&&&&&&&&&& repeat composite operation across and down image
-transform&&&&&&&&&& affine transform image
-treedepth value&&&& color tree depth
-type type&&&&&&&&&& image type
-units type&&&&&&&&& the units of image resolution
-unsharp geometry&&& sharpen the image
-verbose&&&&&&&&&&&& print detailed information about the image
-version&&&&&&&&&&&& print version information
-virtual-pixel method
&&&&&&&&&&&&&&&&&&&&&& virtual pixel access method
-watermark geometry percent brightness and saturation of a watermark
-white-point point&& chromaticity white point
-write filename&&&&& write images to this file
<span style="font-size:18 color:#、montage
创建一些分开的要素图像。在含有要素图像任意的装饰图片,如边框、结构、图片名称等。&
<span style="font-size:18 color:#、compare
在算术上和视觉上评估不同的图片及其它的改造图片。
<span style="font-size:18 color:#、display
如果你拥有一个X server的系统,它可以按次序的显示图片
Usage: display
<span style="font-size:18 color:#、animate
利用X server显示动画图片
Usage: animate /home/zhancang/images/imagename.gif
<span style="font-size:18 color:#、import
在X server或任何可见的窗口上输出图片文件。 你可以捕获单一窗口,整个的荧屏或任何荧屏的矩形部分。(文件名和&#26684;式可以自定义!)
Usage: import imagemane.gif
For example: import windows.gif
<span style="font-size:18 color:#、conjure
解释执行 MSL (Magick Scripting Language) 写的脚本。(对于一般人来说,这个命令用处不大。)
本文已收录于以下专栏:
相关文章推荐
convert命令格式: -resize widthxheight{%} {@} {!} {} {^}
1. 默认时,宽度和高度表示要最终需要转换图像的最大尺寸,同时Convert会控制图片...
需要注意的是:在mac和linux上不要添加imageMagickPath
和设置 convert.setSearchPath(imageMagickPath);
public class...
在网站开发中,对应图片的高质量处理使用ImageMagick的情况比较多。
ImageMagick对应了多平台,多语言。比如java操作图片的时候使用jmaigick就可以了。可以用命令行来操作图片...
Java图片处理 - 安装ImageMagick库使用convert命令之所以要使用第三方库来处理图片,主要原因是:
原生的ImageIO、GIFImageReader可能导致jpg图片发红
前面讲到了最简单的图像处理库CxImage,本文则推荐一个最强大的图像处理库ImageMagick,它被誉为命令行上的PhotoShop,而且被各大公司所采用。
在实现图形合并的时候,因为对Jmagick的处理方式还不熟悉,但是Jmagick依赖于imageMagick,imageMagick又刚好有执行图像合并的命令。
因此想到了利用java调用windo...
class ThumbHandler
var $dst_// 目标文件
var $h_ // 图片资源句柄
var $h_d...
他的最新文章
讲师:宋宝华
讲师:何宇健
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)

我要回帖

更多关于 mac 修改终端名称 的文章

 

随机推荐