This method has to be called BEFORE any files are loaded into the Imagick object.
By default, Imagick will incorrectly read CMYK PDFs - it will read each channel as a greyscale page resulting in 4 times the number of pages. By specifying the desired colorspace (usually SRGB) before reading the file, GhostScript will automatically convert it.
<?php
$im = new Imagick();
// set the sampling resolution
$im->setResolution(200,200);
// set the desired format
$im->SetColorspace(Imagick::COLORSPACE_SRGB);
$im->readimage($file['tmp_name']);
?>