Constructor
new CropAugmenter(opts)
Parameters:
Name |
Type |
Description |
opts |
Object
|
options, if number of array, it is considered as size
Properties
Name |
Type |
Description |
percent |
ArraylRTB
|
percent of cropping to do |
size |
ArraylRTB
|
value of cropping to do |
|
- Source:
Examples
// Simple usage, crop by 10px, on every side
ia.crop(10);
//Simple usage with random variable crop by 10% to 30%
ia.crop({percent : h.number(0.1, 0.3)});
//Crop by 10% on left, 20% on top, to 30% on the right, 10% on the bottom
ia.crop({percent: [0.1, 0.2, 0.3, 0.1]});