|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
裁剪用-crop,jpg没问题,不过碰到gif就要注重了 例如下图: 裁剪只裁剪图片内容,不能消除背景的size,convert image1.gif -crop 75x75+0+0 image2.gif 结果如下图片 解决办法使用+repage参数 convert image1.gif -crop 75x75+0+0 +repage image2.gif 75x75是结果的size,+0+0是图片在画布中间的偏移量,用了+repage会清空图片以外的空白 不过在jmagick的接口中没找到如何把+repage参数传递进去 /** * Creates a new image that is a subregion of the original. * * @param chopInfo the subimage * @return a subimage of the original * @exception MagickException on error */ public native MagickImage cropImage(Rectangle chopInfo) throws MagickException; Rectangle只带了坐标信息,所以我现在切的gif图片size没办法去除所谓的“page geometry ” 这里说下不带偏移量的裁剪,效果很奇异,整个gif加载的时候会滚动在75x75的窗口中最后停下来 convert image1.gif -crop 75x75 +repage image2.gif 参考:http://www.cit.gu.edu.au/~anthony/graphics/imagick6/crop/#crop_repage 返回类别: 教程 上一教程: Java 调用存储过程 下一教程: 端口扫描程序java实现 您可以阅读与"Imagemagick备忘"相关的教程: · 旋风备忘录0.10软件介绍 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |