Fixed Prevent stripping of ICC color profiles when using ImageMagick


Well-known member
JPG and other formats can contain ICC color profile data in the EXIF data. Web browsers use this data to render the image with more precise color matching. Without the color profile data, there can be a noticeable difference in the appearance of the picture.

php's built-in gd library does not support preserving color profiles when resaving, but ImageMagick does!

If the following part of XenForo_Image_ImageMagick_Pecl:: output() is changed:
to this:
$profiles = $this->_image->getImageProfiles('icc', true);


if (!empty($profiles))
    $this->_image->profileImage('icc', $profiles['icc']);
then the color profile will be saved and we won't have washed out looking images for some of our important attachments.


Sample images with icc profiles: (via this site) (via this site)
Last edited: