imagecropper Image Cropper extension

  1. Documentation
  2. Change Log

This extension helps you resize and crop an image as the following :

  1. get the largest area from the original image that fit the desired cropping rectangle ratio.
  2. crop that area from the original image.
  3. resize it to fit the desired cropping rectangle width/height.
  4. save the cropped image in JPEG format with specified quality number.

Documentation

Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/extensions
Usage

See the following code example:

Yii::import('application.extensions.imagecropper.ImageCropper');
$cropper=new ImageCroppe;
//The following will create an JPEG image with height of 100 and width of 100 and 80 jpeg quality.
$cropper->resize_and_crop($original_image_path, $dist_image_path, 100, 100, 80 );

Change Log

February 14, 2010
  • Initial release.
1 0
3 followers
885 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Tags:
Developed by: phiras
Created on: Feb 14, 2010
Last updated: 8 years ago

Downloads

show all