Jump to content

Any limitation on image size?


coderage

Recommended Posts

Hi plz see this code

<?php

        define("T_WIDTH", 300);

        define("T_HEIGHT", 300);

 

        $img = imagecreatefromjpeg("image1.jpg");

        $img_copy = imagecreate(T_WIDTH, T_HEIGHT);

 

        imagecopy($img_copy,$img,0,0,2000,2000,T_WIDTH,T_HEIGHT);

 

        header("Content-type: image/jpeg");

        imagejpeg($img_copy);

       

        imagedestroy($img);

        imagedestroy($img_copy);

?>

 

When image1.jpg = 4000x4000 pixels and 1.22 Mb in size this code works, but when

        image1.jpg = 8000x4000 pixels and 2.07 Mb there is no output and no error msg either.

 

In php.ini file memory_limit is set to 128 Mb

System Ram 256 Mb

 

Solutions and suggestions please.

Link to comment
https://forums.phpfreaks.com/topic/47368-any-limitation-on-image-size/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.