function sigmoidalContrastImage($image_path, $sharpening, $midpoint, $sigmoidalContrast) { $imagick = new \Imagick(realpath($image_path)); $imagick->sigmoidalcontrastimage( $sharpening, $midpoint, $sigmoidalContrast * \Imagick::getQuantum() ); header("Content-Type: image/jpeg"); echo $imagick->getImageBlob(); }