} if (!preg_match('/^[0-9]+x[0-9]+$/', $params)) { if (!Settings::isProductionState()) { exit('Error processing params for action "resizefit". Example: 640x480'); } die; } $check_size_allowed($params); list($w, $h) = explode('x', $params); if ($w > $max_w) { $w = $max_w; } if ($h > $max_h) { $h = $max_h; } $image->resizeFit($w, $h); break; case 'grayscale': if (!$params) { break; } $check_size_allowed($params); $image->grayscale(); break; case 'sharpen': if (!$params) { break; } $check_size_allowed($params); $image->unsharpMask(); break;