Skip to content

Conversation

@lacatoire
Copy link
Contributor

This PR clarifies two optional parameters of Imagick::resizeImage() due to this Issue

  • Adds a short explanation for the $legacy parameter, which was undocumented and not self-explanatory.
  • Improves the wording of $bestfit to describe its observable behavior more clearly.

The changes are intentionally minimal and avoid ImageMagick implementation details.

Copy link

@jordikroon jordikroon left a comment

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.

@lacatoire lacatoire requested a review from jordikroon January 6, 2026 09:31
Copy link

@jordikroon jordikroon left a comment

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.

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.

2 participants