= $intWidth) { $intX = $intX - $intWidth; $intY = $intY + $intPieceHeight; } $dest = imagecreatetruecolor($intPieceWidth, $intPieceHeight); imagecopyresized($dest, $source, 0, 0, $intX, $intY, $intWidth, $intHeight, $intWidth, $intHeight); // this is supposed to make it color, but doesn't //for($i=0; $i<256; $i++) // imagecolorallocate($dest, $i, $i, $i); imagejpeg($dest); ?>