Hello,
When Xenforo calls ImageMagick (PECL version, fwiw), it calls the 'thumbnailImage' function instead of resizeImage (or adaptiveResizeImage).
(resizeImage is only used by Xenforo for Scaling Up)
This can be seen in the php file
\upload\library\XenForo\Image\ImageMagick\Pecl.php:
I believe this would be the correct change:
And make sure ImageMagick version >= 6.2.9 is installed.
references:
https://php.net/manual/en/imagick.adaptiveresizeimage.php (req. ImageMagick version >= 6.2.9)
PHP: Imagick::resizeImage - Manual
Thank you,
Barry
When Xenforo calls ImageMagick (PECL version, fwiw), it calls the 'thumbnailImage' function instead of resizeImage (or adaptiveResizeImage).
(resizeImage is only used by Xenforo for Scaling Up)
This can be seen in the php file
\upload\library\XenForo\Image\ImageMagick\Pecl.php:
Code:
foreach ($this->_image AS $frame)
{
if ($scaleUp)
{
$frame->resizeImage($width, $height, Imagick::FILTER_QUADRATIC, .5, true);
}
else if ($oldImagick)
{
$frame->thumbnailImage($width, $height, true);
}
else
{
$frame->thumbnailImage($width, $height, true, true);
}
$frame->setImagePage($width, $height, 0, 0);
}
I believe this would be the correct change:
Code:
foreach ($this->_image AS $frame)
{
if ($scaleUp)
{
$frame->resizeImage($width, $height, Imagick::FILTER_QUADRATIC, .5, true);
}
else if ($oldImagick)
{
$frame->resizeImage($width, $height, Imagick::FILTER_QUADRATIC, .5, true); // keep EXIF
}
else
{
$frame->adaptiveResizeImage($width, $height, true); // higher-quality scaling + EXIF retained
}
$frame->setImagePage($width, $height, 0, 0);
}
And make sure ImageMagick version >= 6.2.9 is installed.
references:
https://php.net/manual/en/imagick.adaptiveresizeimage.php (req. ImageMagick version >= 6.2.9)
PHP: Imagick::resizeImage - Manual
https://stackoverflow.com/questions/22534752/imagemagick-preserve-exif-data said:You should not use the thumbnailImage image method if you want to preserve exif data... You should use the method resizeImage instead.
ImageMagick Preserve Exif Data
Thank you,
Barry
Upvote
5