<< BACK TO HOME

ByCropper - Image cropper script

Examples

Example 1: Default options

HTML

  1. <img src="eiffeltower.jpg" id="bycropper" />

Javascript

  1. var myCropper = new ByCropper();

Output

Change strict ratio to: Ratio = 4/3 | Ratio = 16/9 | Ratio = 2/3

Change non-strict ratio to: Ratio = 4/3 | Ratio = 16/9 | Ratio = 2/3

Set special ratio: Ratio = Picture | Ratio = Default | No Ratio

Example 2: Color and Opacity customization, min/max size

HTML

  1. <img src="eiffeltower.jpg" id="bycropper_custom" />

Javascript

  1. myCropperCustom = new ByCropper('bycropper_custom', null, {
  2. minWidth: 190,
  3. maxWidth: 380,
  4. minHeight: 110,
  5. maxHeight: 220,
  6. maskColor: "#203060",
  7. maskOpacity: 0.96
  8. });

Output

Coming Soon ...

A PHP script processing the image will be added shortly...