抱歉我的英语很糟糕,大约 3 天前我很困并且为此苦苦挣扎。
我正在使用“slideViewerPro 1.5”来显示图像库(PHP + JS)。
但是,这个 js 脚本强制我让所有图像具有相同的大小。
所以,当我有一张垂直图片时,我想添加一些白色画布,这样它就不会变形。
我尝试过使用 Irfanview 离线使用。行不通。
我尝试破解一些 GD 和 PHP 脚本。也行不通。
搞乱 SlideViewerPro javascript 源代码...两者都不是。
另外...我已经阅读了大约 20 遍这篇文章,但仍然无法弄清楚 GD 是否是一个合适的解决方案。
http://www.rubblewebs.co.uk/imagemagick/GDexamples.php
有人可以告诉我吗?
Sorry my lousy english, I'm sleepy and struggling with this about 3 days ago.
I'm using "slideViewerPro 1.5" to display an image gallery (PHP + JS).
However, this js script forces me to have all the images at the same size.
So, when I have a vertical picture, I would like to add some white canvas to it so it won't get distorted.
I've tried offline, using Irfanview. Won't work.
I've tried hacking up some GD and PHP scripts. Won't work either.
Messing around the slideViewerPro javascript source... neither.
Also... I've read this about 20 times, and still can't figure out if GD is a proper solution.
http://www.rubblewebs.co.uk/imagemagick/GDexamples.php
Can someone enlight me please?!
发布评论
评论(1)
我希望这对使用 GD 有所帮助:
$filename
是文件名,然后我们创建一个大小为 550x325 的空白图像并将图像粘贴到新画布上I hope this helps with using GD:
$filename
is the filename, and then we create a blank image of size 550x325 and paste the image onto the new canvas