src/UI/Image/Processing.php
public function flip( $mode = 0 ){
		$image	= new UI_Image;
		$width	= $this->image->getWidth();
		$height	= $this->image->getHeight();
		$image->create( $width, $height );
		if( $mode == 0 ){
			imagecopyresampled(
				$image->getResource(),	$this->image->getResource(),
				0, 0,
				0, ( $height - 1),
				$width, $height,
				$width, 0 - $height
			);
		}
		else{
			imagecopyresampled(
				$image->getResource(),	$this->image->getResource(),
				0, 0,
				( $width - 1), 0,
				$width, $height,
				0 - $width, $height
			);
		}
		$this->image->setResource( $image->getResource() );											//  replace held image resource object by result
		return TRUE;
	}
public function flip( $mode = 0 ){
		$image	= new UI_Image;
		$width	= $this->image->getWidth();
		$height	= $this->image->getHeight();
		$image->create( $width, $height );
		if( $mode == 0 ){
			imagecopyresampled(
				$image->getResource(),	$this->image->getResource(),
				0, 0,
				0, ( $height - 1),
				$width, $height,
				$width, 0 - $height
			);
		}
		else{
			imagecopyresampled(
				$image->getResource(),	$this->image->getResource(),
				0, 0,
				( $width - 1), 0,
				$width, $height,
				0 - $width, $height
			);
		}
		$this->image->setResource( $image->getResource() );											//  replace held image resource object by result
		return TRUE;
	}
public function flip ( $ mode = 0 ) { $ image = new UI_Image ; $ width = $ this -> image -> getWidth ( ) ; $ height = $ this -> image -> getHeight ( ) ; $ image -> create ( $ width , $ height ) ; if ( $ mode == 0 ) { imagecopyresampled ( $ image -> getResource ( ) , $ this -> image -> getResource ( ) , 0 , 0 , 0 , ( $ height - 1 ) , $ width , $ height , $ width , 0 - $ height ) ; } else { imagecopyresampled ( $ image -> getResource ( ) , $ this -> image -> getResource ( ) , 0 , 0 , ( $ width - 1 ) , 0 , $ width , $ height , 0 - $ width , $ height ) ; } $ this -> image -> setResource ( $ image -> getResource ( ) ) ; //  replace held image resource object by result return TRUE ; }
Flips image horizontally or vertically.
@access		public
@param		integer		$mode		0: horizontally, 1: vertically
@return		boolean		Image has been flipped
Flips image horizontally or vertically .