-1

我正在使用 phpthumb:http ://phpthumb.sourceforge.net/

我的服务器上有大约 500Mb 的图像,phpthumb 为每个图像创建 2 个小拇指( 100x100 300x300 )。问题是 phpthumb 文件夹(带有缓存的图像)是 7GB。那么,怎么可能呢?500MB 图像和 7GB 拇指?

但是,如果有人知道如何解决这个问题,你能告诉我一些其他方法来创建拇指而不使用太多磁盘空间吗?

编辑:这是 7GB 的缓存文件夹中的内容:

 wonder@wonder:~/webapps/mysite/phpthumb/cache$ ls
pThumbdcgAn0  pThumbgOV4iT  pThumbk7kCaR  pThumbnjieys  pThumbPYULm9  pThumbrpmRrw  pThumbTEwQ7J  pThumbV0veyL  pThumbwQ9q6G  pThumbYerk1C  pThumbZZuYuh
pThumbdcgpYI  pThumbgOzg8d  pThumbk7kNm7  pThumbnjKVPy  pThumbPYXGiL  pThumbrpMZWp  pThumbtEXnH5  pThumbv0wl2w  pThumbWQbPOg  pThumbyeRvzX  pThumbZZV7lg
pThumbdCH7V8  pThumbgp1cEO  pThumbk7mCU9  pThumbnJlTyj  pThumbPyy54W  pThumbrPnANX  pThumbTEXtUw  pThumbv0wSQJ  pThumbWqC6Z5  pThumbYEsW3P  pThumbZZvxCD
pThumbdcHexw  pThumbgp1Whz  pThumbk7W8mB  pThumbnjmSux  pThumbpyYiD3  pThumbRpnIJb  pThumbteZZjl  pThumbv0X5R0  pThumbwqgpU1  pThumbYEUOtG  pThumbZZXaCj
pThumbdCI3vo  pThumbgp6H6n  pThumbk7wI6P  pThumbnjNjg6  pThumbpYZ4Gx  pThumbRpnO9s  pThumbTf12uv  pThumbv0XInS  pThumbwqGx7p  pThumbYEVl3E  pThumbZzXPmQ
pThumbdCLpoL  pThumbgpAuiN  pThumbk89Sgb  pThumbnjNUa9  pThumbPZ1ZgP  pThumbrpPUU8  pThumbtf8DKF  pThumbv0xrXD  pThumbWqHG77  pThumbyEW6aJ  pThumbZZyvlJ
pThumbdcmGQa  pThumbgpbD5D  pThumbk8AuZH  pThumbnJNXur  pThumbPz3s0y  pThumbrPq1iF  pThumbTF9EAZ  pThumbV0zYo9  pThumbwQhr5Z  pThumbyEWeyI  pThumbzZYwnw
pThumbdCOoaQ  pThumbgpbNws  pThumbk8E6c4  pThumbnJpfR6  pThumbpz4Ri4  pThumbrPqHbg  pThumbtfAwO2  pThumbV11Qhr  pThumbWqkIun  pThumbYEWSSb  pThumbZZZ81f
pThumbdCQzjy  pThumbgpdBn6  pThumbk8hkeR  pThumbnJpOpb  pThumbpz6LJE  pThumbrpqjno  pThumbTfCloj  pThumbv123te  pThumbWQkmfe  pThumbyeXUVM  pThumbzZz88B.....


wonder@wonder:~/webapps/mysite/phpthumb/cache$ du
4   ./0/0b/0b4/0b44
8   ./0/0b/0b4
12  ./0/0b
16  ./0
4   ./4/49/495/4958
8   ./4/49/495
12  ./4/49
4   ./4/4e/4e7/4e72
8   ./4/4e/4e7
12  ./4/4e
28  ./4
5839852 .
4

2 回答 2

1

这也取决于您编写图像的格式以及上传图像时的平均大小。但是,我同意这太高了。

我正在使用http://phpthumb.gxdlabs.com/来写拇指。它工作得非常快,使用内置的 ImageMagick 东西,并包含一些非常棒的算法。

于 2011-08-13T16:33:47.797 回答
0

For anyone following the advice to use the gdxlabs version, that site now contains a link to their github account. The forums explain that the mention of ImageMagick support was more a todo then functionality already supported:

https://github.com/masterexploder/PHPThumb/issues/29

I found this out a month after running live with it. My website host won't raise the memory limit above 100 MBs, so I am now having to convert back to the sourceforge version. The API for the gxdlabs was definitely better, but I have now had a few users with images slightly above 1 MB which blow out the GD implementation above the 100MB limit.

于 2013-08-01T21:12:29.667 回答