PHP弯曲/扭曲图像的功能 [英] PHP Function to bend/warp an image

查看:252
本文介绍了PHP弯曲/扭曲图像的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用我的简单PHP验证码算法( http:// www。 source.ofitall.com/devel/captcha.php )我一直在努力尝试将其调整为更具吸引力且更易于阅读的Google风格验证码。

I'm working with my simple PHP captcha algorithm (http://www.source.ofitall.com/devel/captcha.php) and I have been struggling to try and adjust it to be the more attractive and easier to read, Google style captcha.

有没有人知道将采用GD图像参考并弯曲/扭曲它的功能,Google风格?

Does anyone know of a function that will take in a GD image reference and bend/warp it, Google style?

推荐答案

如果您可以在服务器上使用ImageMagick,您可能需要这个试一试:

If you can use ImageMagick on your server you might want to give this a try:

  convert koala.gif -background Blue  -wave 10x64  wave.jpg

更新

如果你没有使用某些您显然必须编写自己的库。

If you aren't using some library you will obviously have to write your own implementation.

以下是一些建议,您可以在其中找到有用的信息:

Here are some suggestions where you can find useful informations on that:

然后有一个2样条mash变形算法的解释可能会做你想要的此处

Then there's an explanation of the 2-spline mash warping algorithm that might do what you want here.

这里是对可能满足您需求的算法的一个很好的概述( Microsoft doc文件)。

Here's a good overview over algorithms that might suit your needs(Microsoft doc file).

你应该知道这不是很容易的事情反。但如果你对这个主题感兴趣并且真的必须活着没有ImageMagick,那么这是你唯一的机会(据我所知)。

You should be aware though that this isn't something that's easily implemented. But if you are interested in the topic and really really have to live withouth ImageMagick than that's your only chance(as far as I know).

然后还有GD的糟糕表现..

And then there's also GD's bad performance..

祝你好运! : - )

Good luck! :-)

这篇关于PHP弯曲/扭曲图像的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆