src/UI/Image.php
public function display( $sendContentType = TRUE )
	{
		if( $sendContentType )
			header( 'Content-type: '.$this->getMimeType() );
		switch( $this->getType() )
		{
			case IMAGETYPE_GIF:
				imagegif( $this->resource );
				break;
			case IMAGETYPE_JPEG:
				imagejpeg( $this->resource, NULL, $this->quality );
				break;
			case IMAGETYPE_PNG:
				imagepng( $this->resource );
				break;
			default:
				header_remove( 'Content-type' );
				new UI_Image_Error( 'invalid type' );
		}
	}
public function display( $sendContentType = TRUE )
	{
		if( $sendContentType )
			header( 'Content-type: '.$this->getMimeType() );
		switch( $this->getType() )
		{
			case IMAGETYPE_GIF:
				imagegif( $this->resource );
				break;
			case IMAGETYPE_JPEG:
				imagejpeg( $this->resource, NULL, $this->quality );
				break;
			case IMAGETYPE_PNG:
				imagepng( $this->resource );
				break;
			default:
				header_remove( 'Content-type' );
				new UI_Image_Error( 'invalid type' );
		}
	}
public function display ( $ sendContentType = TRUE ) { if ( $ sendContentType ) header ( 'Content-type: ' . $ this -> getMimeType ( ) ) ; switch ( $ this -> getType ( ) ) { case IMAGETYPE_GIF : imagegif ( $ this -> resource ) ; break ; case IMAGETYPE_JPEG : imagejpeg ( $ this -> resource , NULL , $ this -> quality ) ; break ; case IMAGETYPE_PNG : imagepng ( $ this -> resource ) ; break ; default : header_remove ( 'Content-type' ) ; new UI_Image_Error ( 'invalid type' ) ; } }
Print binary content to standard output.
@access		public
@param		boolean		$sendContentType		Flag: send HTTP header for image type beforehand, default: yes
@return		void
Print binary content to standard output .