Manipulate images using standard methods such as resize, crop, rotate, etc. This class must be re-initialized for every image you wish to manipulate.
This is the code documentation for the SproutCMS project
Search documentation |
class ImageManipulate images using standard methods such as resize, crop, rotate, etc. This class must be re-initialized for every image you wish to manipulate.
Variables
Functions
public __constructvoid $Image->__construct ( string $image [, array $config ] ); Creates a new image editor instance. public __getmixed $Image->__get ( string $property ); Handles retrieval of pre-save image properties public addTextImage $Image->addText ( string $text ); Adds text to the base of an image, e.g. for copyright credit public base64unknown Image::base64 ( Path $file_path [, ImageTransform $transform ] ); Generate a base64-encoded PNG image, e.g. for an <img src="data:image/png;base64,..."> tag public calcResizeDimsarray $Image->calcResizeDims ( int $width , int $height , int $master ); Calculates dimensions to be generated by a resize public cropobject $Image->crop ( integer $width , integer $height [, integer $top [, integer $left ]] ); Crop an image to a specific width and height. You may also set the top and left offset. This method is chainable. public factoryobject Image::factory ( string $image [, array $config ] ); Creates a new Image instance and returns it. public flipobject $Image->flip ( integer $direction ); Flip an image horizontally or vertically. public qualityobject $Image->quality ( integer $amount ); Change the quality of an image. public renderobject $Image->render ( [ boolean $keep_actions ] ); Output the image to the browser. public resizeobject $Image->resize ( integer $width , integer $height [, integer $master ] ); Resize an image to a specific width and height. By default, Kohana will maintain the aspect ratio using the width as the master dimension. If you wish to use height as master dim, set $image->master_dim = Image::HEIGHT This method is chainable. public rotateobject $Image->rotate ( integer $degrees ); Allows rotation of an image by 180 degrees clockwise or counter clockwise. public saveobject $Image->save ( [ string $new_image [, integer $chmod [, boolean $keep_actions ]]] ); Save the image to a new image or overwrite this image. public sharpenobject $Image->sharpen ( integer $amount ); Sharpen an image. protected validSizeboolean $Image->validSize ( string $type , mixed &$value ); Sanitize a given value type. |
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|