Beispiel #1
0
	/**
	 * Renders a transparent PNG of the requested dimensions
	 *
	 * Used in the product gallery to reserve DOM dimensions so the
	 * gallery is rendered with the proper layout
	 *	 
	 * @since 1.1.7
	 *
	 * @return void Description...
	 **/
	function clearpng () {
		require_once(ECART_PATH."/core/model/Image.php");
		$max = 1920;
		$this->width = min($max,$this->width);
		$this->height = min($max,$this->height);
		$ImageData = new ImageProcessor(false,$this->width,$this->height);
		$ImageData->canvas($this->width,$this->height,true);
		$image = $ImageData->imagefile(100);
		header("Cache-Control: no-cache, must-revalidate");
		header("Content-type: image/png");
		header("Content-Disposition: inline; filename=clear.png");
		header("Content-Description: Delivered by WordPress/Ecart Image Server");
		header("Content-length: ".@strlen($image));
		die($image);
	}
Beispiel #2
0
 /**
  * Renders a transparent PNG of the requested dimensions
  *
  * Used in the product gallery to reserve DOM dimensions so the
  * gallery is rendered with the proper layout
  *
  * @author Jonathan Davis
  * @since 1.1.7
  *
  * @return void
  **/
 public function clearpng()
 {
     $max = 1920;
     $this->width = min($max, $this->width);
     $this->height = min($max, $this->height);
     $ImageData = new ImageProcessor(false, $this->width, $this->height);
     $ImageData->canvas($this->width, $this->height, true);
     $image = $ImageData->imagefile(100);
     $this->headers('clear.png', @strlen($image));
     ob_clean();
     // try to catch errant data in buffer
     die($image);
 }