View Full Version : Images Turn Up Black
jaypie77
16th of December 2004 (Thu), 22:53
(I solved the last problem, but here's another)
I managed to get everything working correctly and I have successfully uploaded small test-images and had them appear properly in the normal, thumb, and micro sizes in all the places that they are supposed to be. These are images that have a file sizes less than a megabyte.
When I try to upload and display larger files from my collection, however, I end up with completely black squares in the normal, thumb, and microthumb images. The pages load correctly and all, but the images are black.
ANY IDEA ON WHAT HAPPENED? By the way, I couldn't get ImageMagick to work out just yet, so I'm using G2.
Pekka
17th of December 2004 (Fri), 14:31
This must be because PHP memory limit is set so low it can not handle bigger images. Remember that when a JPEG is 1MB is must be decompressed in memory, so it becomes several megabytes. You can increase memory limit in php.ini or sometimes also by adding a PHP line into e.g. fetchsettings.php
ini_set ("memory_limit","100M");
This does not reserve memory, but gives PHP a permission to use as much. This directive can also be added in .htaccess file (for Apache servers), in that case it is
php_value memory_limit 100M
PS. Why do you need to use so large orginals for EE? If I have e.g. big, medium and small sizes, I make the big size in Photoshop, upload that in EE which makes smaller sizes from it. The size big can have resize method "OFF" which means EE just copies the uploaded file.
jaypie77
17th of December 2004 (Fri), 16:43
Pekka,
Do I just add the following line anywhere into fetchsettings.php?
ini_set ("memory limit","100M");
I just put it in near the top and it didn't work, so rather than guessing, I thought I'd ask you.
The file sizes that I'm uploading are 1.5 mb, and for "normal" size I'm choosing "none" for resizing. Still, not working.
Pekka
17th of December 2004 (Fri), 17:04
Pekka,
Do I just add the following line anywhere into fetchsettings.php?
ini_set ("memory limit","100M");
I just put it in near the top and it didn't work, so rather than guessing, I thought I'd ask you.
The file sizes that I'm uploading are 1.5 mb, and for "normal" size I'm choosing "none" for resizing. Still, not working.
You have to put it somewhere after
<?php
and before
?>
If it is not working it may be that the memory usage setting can not be overridden by users, only in php.ini. I'll try to find out more info how GD2 handles memory if there are any clues about this. Meanwhile you'll just have to use smaller sizes....
If resizemethod "none" is not working (and you use only that path when uploading) then check folder permissions, all temp permissions should be 777. If those are ok then see what ftp messages tell you.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.