Puoi utilizzare la funzione: getimagesize()
Da manuale:
codice:channels will be 3 for RGB pictures and 4 for CMYK pictures.Codice PHP:
<?php
$image = "immagine_da_verificare";
$imageInfo = getimagesize($image);
if ($imageInfo['channels'] == 3) {
echo "RGB";
} else {
echo "CMYK";
}
?>