SMF 2.0.6 Attachment high-resolution image (PNG) loading problem

Started by gevv, January 15, 2014, 01:24:20 PM

Previous topic - Next topic

gevv

Hi,

high-resolution png image loading problem  (tested my forum other smf forum (2.0.6)

for example;

4257x3097  png image  not load straight to the white page




note: loading sometimes but not created thumbnails view problem topic
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Arantor

Well, yeah, the image is too large for your server to handle. To make the thumbnail the server has to load the entire, uncompressed, image and it takes a lot of memory.

GD will require... let's see... 4257x3097x4 = 52,735,716 bytes minimum for that image, plus the rest of the PHP that's loaded that page load, which means probably even 64MB won't be enough for that and it fails because it hits the memory limit directive. SMF tries to expand it to 90MB for that but your server obviously doesn't let it.

gevv

image size does not matter used for testing png  image size 38kb

4257x3097  JPG image loading no problem
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Arantor

Doesn't matter. If it's an image that's still that large - it can be very tiny when compressed, but the uncompressed size is what gets used for memory purposes and it's still overflowing the memory limit of your system. (JPG actually uses slightly less memory than PNG does, all things considered)

Advertisement: