• Hey Guys,

    I hope someone can help me out because I tried almost everything and nothing works.

    When I upload a .png file (with transperancy, idk if that matters) with a pixel size of over 1500px and try to edit the thumbnail (no thumbnail was created) I’ll get an “Error: Exceed memory limit” with following text:

    Warning: Division by zero in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 293

    Warning: Division by zero in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 306

    Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 436

    Warning: imagealphablending() expects parameter 1 to be resource, boolean given in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 934

    Warning: imagesavealpha() expects parameter 1 to be resource, boolean given in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 935

    Warning: imagecolorallocatealpha() expects parameter 1 to be resource, boolean given in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 936

    Warning: imagefilledrectangle() expects parameter 1 to be resource, boolean given in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 937

    Warning: imagecopyresampled() expects parameter 1 to be resource, boolean given in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/gd.thumbnail.inc.php on line 940

    Warning: Division by zero in /var/www/web923/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/edit-thumbnail.php on line 42

    When I click on the image, it appears normally.

    About the same happens when I try to resize the image (normally it should be resized when uploading, but that doesn’t work as well, although there isn’t any error).

    An here’s the weird thing: It can be resized when the .png file is under 200kB, and when resized a thumbnail can be created.

    But when I upload a .png with over 200kB and over 1500px side with, it cannot resize it nor can it create a thumbnail.
    But when I preresize the image to 1500px or less the filesize doesn’t matter anymore (over 200kB) and a thumbnail can be created.

    What I already did:
    – I tried to uncomment the famous line 168 in gd.thumbnail.inc.php (that one with the ‘128M’ memory limit
    – I manually set my server PHP memory limit to 128M

    Both didn’t help. 128M really should be enough for that script.

    Would be awesome if someone could help me out with that.

    klafkid

  • The topic ‘NextGen Gallery (2.0.40) Exceed memory limit with .png when resize or thumbnail’ is closed to new replies.