thedude
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:
then the color profile will be saved and we won't have washed out looking images for some of our important attachments.
Ref: http://stackoverflow.com/questions/...-exif-from-a-jpg-without-losing-image-quality
Sample images with icc profiles:
https://cdn.photographylife.com/wp-content/uploads/2014/07/Adobe-Camera-PROVIA-STANDARD.jpg (via this site)
http://dev.exiv2.org/attachments/download/820/Reagan.jpg (via this site)
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:
Code:
$this->_image->stripImage();
to this:
Code:
$profiles = $this->_image->getImageProfiles('icc', true);
$this->_image->stripImage();
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.
Ref: http://stackoverflow.com/questions/...-exif-from-a-jpg-without-losing-image-quality
Sample images with icc profiles:
https://cdn.photographylife.com/wp-content/uploads/2014/07/Adobe-Camera-PROVIA-STANDARD.jpg (via this site)
http://dev.exiv2.org/attachments/download/820/Reagan.jpg (via this site)
Last edited: