I'm trying to create a dynamic image system for my school band, except my images are being warped somehow. I don't know if it's the code or the server's implementation of the GD lib. Here's the code:
<?php
Header("Content-Type: image/png");
$im = ImageCreateFromPNG("field.png");
$im_out = ImageCreate(420,420);
$bg = ImageColorAllocate($im_out, 255, 255, 255);
ImageCopy($im_out, $im, 0, 0, 0, 0, 420, 420);
ImagePNG($im_out);
ImageDestroy($im_out);
ImageDestroy($im);
?>
The code works, with the exception of the warped image. You can see the result at http://mchstubas.nexen.net/jpegtest.php. Any help is appreciated.