看起来图像调整大小效果不佳
-
-
请解释"不正常"的意思.Please explain what you mean by "not working well".
- 0
- 2011-05-18
- scribu
-
有时调整图像大小,有时不调整大小.Sometimes images are resized and sometimes not.
- 0
- 2011-05-18
- José Pablo Orozco Marín
-
您需要更好地解释您的问题.不调整图像大小会怎样?你有错误吗?可以保存,但是不会生成图像吗?You'll need to explain your problem better. What happens when images are not resized? You get an error? It saves ok but the images are not generated?
- 0
- 2011-05-18
- MZAweb
-
我建议看一下这篇文章.它会以提示其他用户回答的方式帮助您解释问题.http://blog.superuser.com/2011/05/02/how-to-get-answers/I recommend taking a look at this article. It'll help you explain your question in a way that prompts other users to answer. http://blog.superuser.com/2011/05/02/how-to-get-answers/
- 0
- 2011-05-18
- Zach Shallbetter
-
谢谢您的指导,老实说,我知道所有这些事情,但是这次我得到了我应得的懒惰白痴.我只是更新我的问题.贝索斯.Thanks for your guidelines, honestly I know all those things, but this time I get what I diserve for been a lazy moron. I just update my question. Besos.
- 0
- 2011-05-18
- José Pablo Orozco Marín
-
2 个回答
- 投票数
-
- 2011-05-18
过去上传大型图像时,我遇到了同样的问题.当处理图像时,它会失败并以红色显示HTTP错误.但是,其他图像继续加载.并不是文件大小会失败,而是图像的像素宽度和高度.
默认的PHP设置中,每个图片最多可以处理的GD库为1,000,000像素,即1024px * 1024px
您知道吗:Truecolor的8,000像素乘以8,000像素乘以四个字节等于256兆字节.现在,我知道没有共享的托管虚拟主机可以让您的PHP内存限制为256MB
我能找到的唯一解决方案是减小上传的图像尺寸.或者说服您的虚拟主机提高PHP内存限制,这不太可能.
I've had the same issue in the past when uploading very large images. When it comes to crunching the image it fails and shows HTTP ERROR in red. However other images continue to load. It wasnt file size where it would fail but rather the pixel width and height of the images.
By default PHP settings, the most GD libary can handle per image is 1,000,000 pixels which is 1024px*1024px
Did you know: 8,000 pixels times 8,000 pixels times four bytes for truecolor equals a walloping 256 megabytes. Now I know no shared hosting webhost that allows you a PHP memory limit of 256MB
The only solution I was able to find, of which I'm offering to you, is to reduce the size of the images beging uploaded. Alternativly convince your webhost to up PHP memory limit, which is unlikely.
-
谢谢.一个问题,是否存在一些WP常量或挂钩以减少上传限制?这是在.htaccess中尝试的方法: php_value upload_max_filesize 4M php_valuepost_max_size 5M php_valuememory_limit 90M 但是上传限制继续为:7MB.Thanks. A question, there exists some WP constant or hook to decrease upload limit? This is what tried in .htaccess: php_value upload_max_filesize 4M php_value post_max_size 5M php_value memory_limit 90M But the upload limit continues in: 7MB.
- 0
- 2011-05-19
- José Pablo Orozco Marín
-
- 2011-05-19
正如@Brady所说,很多设置只能达到1024 x 1024,将来可能会随着分辨率,浏览器,互联网速度等统计数据的改变而改变,并且表明很多人在运行更好或更新的系统
减小图像尺寸,因为大多数用户不需要查看大于1024 x 1024的图像.我通常使用800 x 600或更大但小于1024 x 1024的图像.尽管我的大多数图像都较小,>
As @Brady said alot of settings go only to 1024 x 1024 this will probably change in the future as stats for resolutions, browsers, Internet speeds, etc change and show that alot of people are running better or newer systems
reduce the image size as most users do not need to view a image that is bigger then 1024 x 1024. I usually use the 800 x 600 or bigger but less then 1024 x 1024. Most of my images though are smaller
-
通过smush.run来运行图像.在这种情况下,它首先无济于事.GD打开图像时,它将像位图图像一样在内存中打开它.每个像素都有自己的RGBA,因此每个像素大约占用3-4个字节的数据.您可以优化所有想要的图像,以免对其进行处理.runnnig the image through smush.it first wont help in this instance. When GD opens the image it opens it in memory like a bitmap image. Each pixel has its own RGBA so each pixel takes up roughly 3-4bytes of data. You can optimize the image all you want it wont help when you come to proccess it.
- 0
- 2011-05-19
- Scott
-
没错,我忘了True i forgot about that
- 0
- 2011-05-19
- xLRDxREVENGEx
我在寻找有关此行为的一些线索吗?我认为这是PHP的memory_limit或WP define('WP_MEMORY_LIMIT','X')问题?
有时调整图像大小,有时不调整大小,在其他情况下浏览器崩溃:
我使用Dreamhost作为共享主机,并限制了其7个上传限制.
打印错误,并上传了大小为6.4MB,宽度和高度为11684x3855的图像: 致命错误:在第254行的/PATH/wp-includes/media.php中耗尽了268435456字节的允许内存大小(尝试分配46736字节)
其他用户报告了相同的文件问题,例如3MB的文件,但宽度和高度更高(优于2000px或3000px).
欢迎任何帮助.
谢谢.