Unless forced (with a ! resize flag) Im will preserve the aspect ratio of the pixels.
As for your request, you will have to extract the size info and do the test yourself, Im is not that specific.
That should be easy with the MagcikWand, as you can read in the image once, do your test, do the appropriate resize, then write it as appropriate.
Resizing user submitted photos
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/