imagecreatefrompng function giving error of "Out of memory "
<p>I have this information about my servers <code>php.ini</code> values set in it.</p>

<pre><code>max_execution_time  30
memory_limit    256M
post_max_size   64M
</code></pre>

<p>When I try to make thumbnail of image its gives me error as follows...</p>

<blockquote>
  <p>Fatal error: Out of memory (allocated 27787264) (tried to allocate 15054336 bytes)   </p>
</blockquote>

<p>in......</p>

<p>image size is 8.81 MB.</p>

<p>This is my code-</p>

<pre><code>$sizee = @getimagesize($newfilename);

        switch ($sizee['mime']) {
            case "image/jpeg" :
            $srcImage = imagecreatefromjpeg($old);
            break;
            case "image/png":
            $srcImage = imagecreatefrompng($old);
            break;
            case "image/gif":
            $srcImage = imagecreatefromgif($old);
            break;
        }
</code></pre>
