use Image::Magick; my $image = Image::Magick->new; my $x = $image->Read('filename.eps'); warn "$x" if "$x"; my $colorspace = $image->Get('colorspace'); print "$colorspace\n";