4) $modifiers['colors'] = array_slice($modifiers['colors'],0,4); } } $img = $pg->generateImage($modifiers); $img = $pg->gradient($img, $modifiers['colors']); $img = $pg->addSizeText($img,$modifiers); header ("Content-type: image/jpeg"); header ("ETag: $hash"); header('Cache-control: public, max-age=31536000'); imagejpeg($img,null,(defined('JPEG_COMPRESSION')?JPEG_COMPRESSION:90)); } public function handleUpload($tmpfile,$hash=false) { return array('status'=>'err','hash'=>$hash,'reason'=>'Cannot upload to placeholder image'); } }