如何创建动画图像?
我有一个简单的 jpg 图像,我想用它创建动画图像。
有人能给我建议吗?
我对 imagegif() 有想法。但这不是我需要的。我想创建一个从简单的 jpg 图像移动的图像。是否可以。
我考虑过 imagegif()
,但这不是我需要的。如果可能的话,我想从 JPG 图像创建移动图像。
任何帮助将不胜感激。
谢谢。
Possible Duplicate:
PHP - Create simple animated GIF from two JPEG images?
I have a simple jpg image, and I want to create animated image with it.
Can anyone suggest me any ideas?
i have idea about imagegif(). But that is not what i need. I want to create a image that moves from that simple jpg image. Is it possible.
I've thought about imagegif()
, but that was not what I needed. I want to create a moving image from JPG image, if it's possible.
Any help will be highly appreciated.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
只需浏览此网站并上传 2,3,4.5 张任意数量的图片即可进行排序。
尝试一下
picasion.com
,
Wasim
Just go through this website and upload 2,3,4.5 as many pictures you like for sequencing.
Try it
picasion.com
with regards,
Wasim
您可以使用 gifmerge 类,它很简单
试试我!
You can use gifmerge class its easy
Try me !
目前尚不完全清楚您要从问题中寻找什么,但如果您想要拍摄一张图像并将其制作为动画图像,您有几个选择:
从编程的角度来看,这些选项中最有趣的是#1(对于#2 -是的,您所需要的只是 imagegif 之类的东西)。
您可以通过 PHP 通过 IMagick ImageMagick 的 PHP 接口。您想要的是在那里选择一种失真方法(有很多),然后使用稍微不同的参数对源图像运行几次,以产生不同的帧。之后,您可以将生成的帧与 imagegif() 或类似的函数组合起来。
It's not totally clear what you're looking for from the question, but if what you want is to take a single image and make it an animated one, you have a couple of options:
The most interesting of these options from a programming standpoint is #1 (for #2 - yes, all you'd need is something like imagegif).
You could use ImageMagick distortion effects via PHP via the IMagick PHP interface to ImageMagick. What you'd want is to pick a distortion method there (there are plenty), then run it against the source image several times with slightly varied parameters, to produce different frames. After this, you can combine the resulting frames with imagegif() or similar.
这不能用 GD 来完成,但我找到了一个很棒的库。虽然它有点复杂,所以这里有一个使用 php 制作动画 gif 的库的链接。它解释了如何彻底使用它。 http:// /www.phpclasses.org/package/3163-PHP-Generate-GIF-animations-from-a-set-of-GIF-images.html
您可以在此处查看我使用此库的示例:http://cmon.horizon-host.com/gifs/slideshow_normal.php
在网站上只需选择 2 张图片,然后在宽度和高度上写上 100 表示速度 900。它将把它们放入动画 gif 幻灯片中。
下面是该脚本的代码:
如您所见,它引用了第一个链接上找到的 GIFEncoder 类。它还使用了一些 javascript 验证和 jQuery 多重上传。
注意:这个问题已经被问过。
This cannot be done with GD but I found a great library for it. It is a bit complicated though, so here is a link to the library which makes animated gifs with php. It explains how to use it thoroughly. http://www.phpclasses.org/package/3163-PHP-Generate-GIF-animations-from-a-set-of-GIF-images.html
You can look at my example using this library here: http://cmon.horizon-host.com/gifs/slideshow_normal.php
On the site just select 2 pictures and write 100 for speed 900 for width and height. It will put them in an animated gif slideshow.
Here is the code for that script:
As you see it references the GIFEncoder class found on the first link. It also uses some javascript validation and jQuery multiupload.
Note: this question has already been asked.
在您的 css 文件中使用此代码。
在 html 中...
如果您的浏览器是 Mozilla Firefox,请将 -webkit- 替换为 -moz-。
玩得开心...
Use this code in your css file.
And in html...
If your browser is Mozilla Firefox, replace -webkit- with -moz-.
Have fun...