Code: Select all
<?php
if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {
$im = $GLOBALS["HTTP_RAW_POST_DATA"];
} else {
echo 'result=error';
exit;
}
$image = ($im);
$i = new Imagick($image);
$i->setImageColorspace(Imagick::COLORSPACE_CMYK);
$i->setImageFormat('jpg');
echo ($i);
?>