Easy image manipulation component for CakePHP just like QImage... It is replacement... It can crop, resize, watermark and save or display the processed image directly to the browser...
- Download the component by click to this link Download EZimageComponent.
- Extract the downloaded file using your compression tool like 7Zip,Winrar or Winzip.
- Copy 'app' folder then put that to the root of your project folder. Example: /your_project/app/Controller/Component/EZimageComponent.php
- Then inside your controller file, add 'EZimage' to the $components property just like below:
<?php
class ProjectController extends AppController
{
public $components = array( 'EZimage' );
}
?>
$this->EZimage->upload( $uploadData, $uploadDir, $filename = NULL, $returnObject = FALSE );
$this->EZimage->file( $filepath )->crop( $width, $height, $x, $y )->save( $outputDir, $returnObject );
$this->EZimage->file( $filepath )
->cropAtCenter( $width, $height, $x, $y )
->resize( $width, $height, $proportional )
->save( $outputDir, $returnObject );
-
initialize(Controller $controller )
-
upload( $uploadData, $uploadDir, $filename = NULL, $returnObject = FALSE )
-
file( $filepath )
-
crop( $width = 0, $height = 0, $x = 0, $y = 0 )
-
cropAtCenter( $width = 0, $height = 0 )
-
resize( $width = 0, $height = 0, $proportional = TRUE )
-
watermark( $watermarkImage = NULL, $marginRight = 5, $marginBottom = 5 )
-
save( $outputDir = NULL, $returnObject = FALSE )
-
rollback()
-
display()
-
getError()