$p['source'] = './source/'; // path of source images with trailing slash
$p['dest'] = './dest/'; // path of destination images with trailing slash
Adds dimentions to file [basename]-1200x900.jpg and, if destination exists increments filename is_integer [basename]-1200x900-2.jpg
$p['autoname'] = false;
$p['destination_width'] = 1200;
$p['destination_height'] = 900;
$p['background_color']['r'] = 127;
$p['background_color']['g'] = 127;
$p['background_color']['b'] = 127;
$p['background_color'] = '#CCCCCC';
$p['background_color'] = 10; // (auto)
$p['image_padding'] = 20;
$p['cropping_threshold'] = 'auto';
$p['cropping_threshold'] = 50;
Process all images in ./source/.{png,jpeg,jpg,gif}, save as original filenames in ./dest/ as a 1200 x 900 image, get background color from 10px in from the corners, add additional 20px padding to cropped image.
$p['source'] = './source/';
$p['dest'] = './dest/';
$p['autoname'] = false;
$p['destination_width'] = 1200;
$p['destination_height'] = 900;
$p['background_color'] = 10;
$p['image_padding'] = 20;
$p['cropping_threshold'] = 'auto';
Process './source/jack-daniels.jpeg', save as './dest/jack-daniels-400x300.jpeg' (autoname) as a 400 x 300 image, white background color for fropping and fill, add 100px padding around cropped image.
$p['input_image'] = './source/jack-daniels.jpeg';
$p['output_image'] = './dest/jack-daniels.jpeg';
$p['autoname'] = true;
$p['destination_width'] = 400;
$p['destination_height'] = 300;
$p['background_color']['r'] = 255;
$p['background_color']['g'] = 255;
$p['background_color']['b'] = 255;
$p['image_padding'] = 100;
$p['cropping_threshold'] = 'auto';