网络编程
位置:首页>> 网络编程>> Asp编程>> ImageMagicK convert crop参数说明

ImageMagicK convert crop参数说明

作者:oxl 来源:Javadream 发布时间:2008-10-21 12:46:00 

标签:ImageMagicK,参数,图片

-crop参数是从一个图片截取一个指定区域的子图片.

格式如下:

convert -crop widthxheight{+-}x{+-}y{%}

width 子图片宽度

height 子图片高度

x 为正数时为从区域左上角的x坐标,为负数时,左上角坐标为0,然后从截出的子图片右边减去x象素宽度.

y 为正数时为从区域左上角的y坐标,为负数时,左上角坐标为0,然后从截出的子图片上边减去y象素高度.

如:

convert -crop 300x400+10+10 src.jpg dest.jpg 

从src.jpg坐标为x:10 y:10截取300x400的图片存为dest.jpg

convert -crop 300x400-10+10 src.jpg dest.jpg 

从src.jpg坐标为x:0 y:10截取290x400的图片存为dest.jpg

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com