Figured it out thanks to a comment on the
profileImage manual page:
Solution: Install LCMS delegates and recompile ImageMagick, you may need to remove and reinstall the PHP extension as well.
profileImage()seems to be doing nothing — and "inverted colors" during a CMYK > RGB conversion is a sign of this — check that ImageMagick has the lcms delegate available.
From a command prompt:
convert -list configure | grep DELEGATES
If you don't see lcms in the list then Imagick won't do any color profile conversions, and won't give any warnings about this. In that case, install the Little CMS library ( http://www.littlecms.com/ ) and recompile ImageMagick.