My main goal is to crunch all the images in a given directory. I'd also like to add a header/footer to each image, but that's a different story.
The first problem is I'm getting an error: call to an undefined function (ImageCreate), even after I put in my header.
<?php
// resize
Header("Content-type: image/jpeg");
$original = "big.jpg";
$small = ImageCreate(100,100);
ImageCopyResized($small,$original,0,0,0,0,100,100,500,500);
Imagejpeg($small, "new_big.jpg");
ImageDestroy($original);
?>
So from what I gather we need to
1. Create a canvas (using ImageCreate())
2. Draw a picture on the canvas
3. Send the picture to the browser or save
4. Clean up memory
Is there some enviroment variable I'm missing that it's not recognizing ImageCreate or am I possibly missing a whole library?
Thanks