PNG Image upload

See all posts Reply

PNG Image upload new!
by Galal ALy, 14 years, 9 months ago
Hello,

I used your magnificent class to upload images and create thumbs. It's working except for the PNG large images. example this one.

The problem is : the thumb created for png large file has the same width and the same height as the original file .. here is the code for the upload and the thumb :

$myimg->file_overwrit      = true;
$myimg->image_convert      = 'jpg';
$myimg->file_new_name_body = "photo_$id";
$myimg->Process('../images');
if(!($myimg->processed))
    return false;
$myimg->image_resize       = true;
$myimg->file_overwrite     = true;
$myimg->image_convert      = 'jpg';
$myimg->file_new_name_body = "thumb_$id";
$myimg->image_x            = 120;
$myimg->image_y            = 120;
$myimg->Process('../thumbs');
if($myimg->processed)
    return true;
else
    return false;
Reply
Re: PNG Image upload new!
by colin, 14 years, 9 months ago
I tried with your image, and it got resized properly.

You are probably running out of memory, try to increase the memory limits in your php.iniReply
Re: PNG Image upload new!
by Galal ALy, 14 years, 9 months ago
yeah it seems that was the problem. Thanks a lot for your help :)Reply