Skip to content

Document legacy and clarify bestfit parameters for Imagick::resizeImage#5056

Open
lacatoire wants to merge 11 commits into
php:masterfrom
lacatoire:imagick/resizeimage-legacy-doc
Open

Document legacy and clarify bestfit parameters for Imagick::resizeImage#5056
lacatoire wants to merge 11 commits into
php:masterfrom
lacatoire:imagick/resizeimage-legacy-doc

Conversation

@lacatoire

@lacatoire lacatoire commented Dec 23, 2025

Copy link
Copy Markdown
Member

This PR clarifies two optional parameters of Imagick::resizeImage()

Fixes #4816

@jordikroon jordikroon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the changelog file the legacy property has also been added to a few other methods. Would you be able to implement these as well?

To be exact, this is the changelog of Imagick 3.4.0.

Imagick::adaptiveResizeImage, Imagick::cropThumbnailImage Imagick::resizeImage,
Imagick::scaleImage, and Imagick::thumbnailImage have all had a rounding bug fixed.
An additional parameter has been added to each of them, 'bool $legacy'. If legacy
is true, the calculations are done with the small rounding bug that existed in
Imagick before 3.4.0. If false, the calculations should produce the same results as
ImageMagick CLI does.

Comment thread reference/imagick/imagick/resizeimage.xml
Comment thread reference/imagick/imagick/resizeimage.xml Outdated
@lacatoire lacatoire requested a review from jordikroon January 6, 2026 09:31

@jordikroon jordikroon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me. Unless someone objects.

Comment thread reference/imagick/imagick/adaptiveresizeimage.xml Outdated
Comment thread reference/imagick/imagick/adaptiveresizeimage.xml Outdated
Comment thread reference/imagick/imagick/adaptiveresizeimage.xml Outdated
Comment thread reference/imagick/imagick/adaptiveresizeimage.xml Outdated
Comment thread reference/imagick/imagick/cropthumbnailimage.xml Outdated
Comment thread reference/imagick/imagick/cropthumbnailimage.xml Outdated
Comment thread reference/imagick/imagick/resizeimage.xml Outdated
Comment thread reference/imagick/imagick/resizeimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/resizeimage.xml Outdated
Comment thread reference/imagick/imagick/scaleimage.xml Outdated
Comment thread reference/imagick/imagick/resizeimage.xml Outdated
Comment thread reference/imagick/imagick/cropthumbnailimage.xml Outdated
@lacatoire lacatoire force-pushed the imagick/resizeimage-legacy-doc branch from 1a4468f to c1d141a Compare June 23, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Imagick::resizeImage 's $legacy argument lacks explanation

2 participants