因为最近一段时间发生了一点事所以没有更新BLOG。不太好意思。
前几天有一个朋友找到我,说在imagewand上生成的动态GIF一直有问题。
本想研究一下,但后来经过沟通imagick也可以,就答应他搞一个出来。
效果图:

» 阅读全文
By mpeg on 2008, October 26, 12:36 AM
因为最近一段时间发生了一点事所以没有更新BLOG。不太好意思。
前几天有一个朋友找到我,说在imagewand上生成的动态GIF一直有问题。
本想研究一下,但后来经过沟通imagick也可以,就答应他搞一个出来。
效果图:

» 阅读全文
By mpeg on 2008, September 21, 8:23 PM
By mpeg on 2008, August 30, 6:49 PM
此官方例子改写又让我消费了半天时间,因为在imagick手册里对fximage的返回值描述为:
------------------------------------
返回值
Returns TRUE on success.
------------------------------------
折磨人呀。。。。
害得我又去翻源码去了,汗呀,看来应该发个邮件对imagick手册中fximage这个函数做个纠正。哈!
生成前图片:

生成后图片:

» 阅读全文
By mpeg on 2008, August 23, 3:31 PM
imagemagick 有命令行convert 可以做很多效果。但如果EXEC被禁用的话那比较麻烦了。前些天就有一位朋友问我是不是可以将imagemagick官方的一个将图片背景变成透明的写法转成imagick写法。
这几天花了时间研究了一下,官方的imagick帮助看了半天没有收获,只能将就着去翻他的源码,终于有点收获。
转换前图片:源图

转换后图片,为了看得更清楚使用PS处理。

» 阅读全文
By mpeg on 2008, August 14, 11:41 PM
The most dramatic effect on images can be usually achieved with very simple tricks. The original image in this example has been scaled down a few times so you can see it is getting a bit blurred.
The original image (provided by Kevin Waterson)

And here is the enhanced version:

» 阅读全文
By mpeg on 2008, August 5, 8:56 PM
ImagickDraw is a pretty simple class once you get used to it. One could consider ImagickDraw object as an "operation fifo". All operations are executed in order when drawImage method is called. You could for example call rotate and it would affect all drawing operations executed after it on the specific object.
» 阅读全文
By mpeg on 2008, August 4, 8:05 PM
Here is an example of a bit more complex drawing operation using ImagickDraw. This example extends the ImagickDraw class to create a custom shape, in this case a flower. That flower is then rendered to a canvas.
效果图:
![]()
» 阅读全文
By mpeg on 2008, August 3, 10:46 AM
Here is an example of how to create a polaroid style effect on an image. This effect is available if you have compile Imagick against ImageMagick 6.2.8 or newer:
Here is the original image:

And here is the image with the polaroid effect:
![]()
» 阅读全文