Exemplo n.º 1
0
 /**
  *	Makes the image smoother.
  *	Applies a 9-cell convolution matrix where center pixel has the weight arg1 and others weight of 1.0.
  *	The result is normalized by dividing the sum with arg1 + 8.0 (sum of the matrix).
  *	Any float is accepted, large value (in practice: 2048 or more) = no change
  *	@access		public
  *	@param		integer		$weight		Level of smoothness
  *	@return		boolean
  */
 public function smooth($weight)
 {
     return imagefilter($this->image->getResource(), IMG_FILTER_SMOOTH, $weight);
 }
Exemplo n.º 2
0
 /**
  *	Rotates image clockwise.
  *	Resulting image may have different dimensions.
  *	@access		public
  *	@param		integer		$angle			Angle to rotate (0-360)
  *	@param		integer		$bgColor		Background color
  *	@param		integer		$transparency	Flag: use transparency
  *	@return		object		Processor object for chaining
  */
 public function rotate($angle, $bgColor = 0, $ignoreTransparent = 0)
 {
     $bgColor = $this->image->colorTransparent;
     $this->image->setResource(imagerotate($this->image->getResource(), -$angle, $bgColor));
     return $this;
 }