akanevsky
05-26-2005, 09:33 PM
Hi!
I am coding an image resize script, and I've ran into the following problem:
I am using imagecopyresampled to resize it. Then, if, say, it is a jpeg image, then imagejpeg($image) will output the picture. However, if I try saving $image to my database, then retrieving it and imagejpeg-ing it, it tells me that it is a non-valid imagejpeg resource. If I try to print() it, it tells me "Resource id #29"...
I assume that $image is a resource, and cannot be just saved. How do I convert it to a normal saveable image? Thanks.
I am coding an image resize script, and I've ran into the following problem:
I am using imagecopyresampled to resize it. Then, if, say, it is a jpeg image, then imagejpeg($image) will output the picture. However, if I try saving $image to my database, then retrieving it and imagejpeg-ing it, it tells me that it is a non-valid imagejpeg resource. If I try to print() it, it tells me "Resource id #29"...
I assume that $image is a resource, and cannot be just saved. How do I convert it to a normal saveable image? Thanks.