I wrote:
$im = imagecreatefromstring($im_string);
return imagegif($im,'a.gif');
The content of variable $im_string I get from a ZIP file.
It should work, but it returns ‘1’.
Why is the reason?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
imagegiffunction returns a boolean, so a return value of 1 would indicate that it was successful.If you need to return the actual image data, you need pass the second parameter as well and read the data from the file, or buffer the output of the function.
Or: