} else { // this is a vertical image $crop_width = $original_width; $crop_start_y = $original_height / 2 - $crop_width / 2; $crop_start_x = 0; } } set_include_path(get_include_path() . PATH_SEPARATOR . $basepath . "/modules/bolts/lib"); set_include_path(get_include_path() . PATH_SEPARATOR . $config['application']['asido_path']); define('ASIDO_DIR', null); @(include 'class.asido.php'); @asido::driver('gd_c'); $i1 = @asido::image($image, $resized); if ($crop) { @asido::Crop($i1, $crop_start_x, $crop_start_y, $crop_width, $crop_width); @asido::width($i1, $max_width); } else { if ($max_height > 0) { $use_height = $max_height; } else { $use_height = 1000; } @asido::fit($i1, $max_width, $use_height); } if ($format == "jpg") { @asido::convert($i1, 'image/jpeg'); } @$i1->save(ASIDO_OVERWRITE_ENABLED); } header("Content-Length: " . filesize($resized)); if ($format == "jpg") {