Hate to file an issue against my own code, but related to 🐛 Rotate should alter dimensions Closed: outdated auto-orient has the same problem, but worse, because whether or not the image will be rotated is not known until the auto orient is executed.
In particular I think this is really only a problem for "scale and crop" because the core scale and crop manipulates the (possibly incorrect) image height and width and calls "scale" and "crop" individually.
I believe the "clean" way to fix this is to have drupal core not have "inside knowledge" of how the image toolkits work, but simply delegate the operations to the image toolkits. That means that image_scale_and_crop() would call the image toolkits' scale_and_crop(). The gd version would be the code now in image_scale_and_crop() and the imagemagic version would do something like
-resize 'widthxheight^' -crop widthxheight
which does the appropriate thing regardless of rotation.
Does this make sense?
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.