} $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; case 'interlace': $check_size_allowed($params); $image->interlace((int) (bool) $params); break; case 'fill': if (!$params) { break; } $check_size_allowed($params); if (!preg_match('/^[0-9]+x[0-9]+x[0-9a-f]{6}$/i', $params)) { if (!Settings::isProductionState()) { exit('Error processing params for action "fill". Example: 32x32xff00cc'); } die;