/**
* A test function for testing _imagemagick_crop_image.  It allows
* you to test several cases quickly.
*/
function im_resize_images()
{
    global $d;
    $img_ids = explode(",", $d['image_id']);
    $width = (int) $d['w'];
    $height = (int) $d['h'];
    $crop_style = $d['crop_style'];
    $target = array();
    $source = array();
    $url = array();
    foreach ($img_ids as $id) {
        $rsi = new reasonSizedImage();
        $rsi->set_id($id);
        $rsi->set_width($width);
        $rsi->set_height($height);
        $rsi->set_crop_style($crop_style);
        $target[] = $rsi->_get_path();
        $entity = new entity($id);
        $source[] = reason_get_image_path($entity, 'standard');
        $url[] = $rsi->_get_url();
    }
    //	print_r($target);
    //	pray($source);
    //	pray($url);
    for ($i = 0; $i < count($source); $i++) {
        _imagemagick_crop_image($width, $height, $source[$i], $target[$i], false);
    }
    $str = "";
    for ($i = 0; $i < count($url); $i++) {
        $str .= "" . $url[$i] . ",";
    }
    $str = trim($str, ",");
    echo $str;
    //		_imagemagick_crop_image($nw,$nh,$source,$target,false);
    //	resize_images();
}