public function scale($scl)
{
// Determine the new width and height of the image based on the
// value of the $scl argument.
$wid = round($this->width * $scl);
$hgt = round($this->height * $scl);
// Create a new image output resource.
$this->createResource();
$this->output = imagecreatetruecolor($wid, $hgt);
// Copy newly sized image to the output resource.
$this->copyImage($wid, $hgt);
return $this;
}