blueimp / JavaScript-Load-Image

Load images provided as File or Blob objects or via URL. Retrieve an optionally scaled, cropped or rotated HTML img or canvas element. Use methods to parse image metadata to extract IPTC and Exif tags as well as embedded thumbnail images, to overwrite the Exif Orientation value and to restore the complete image header after resizing.
https://blueimp.github.io/JavaScript-Load-Image/
MIT License
4.45k stars 922 forks source link

maxWidth/maxHeight not working with aspectRatio #143

Open anisabboud opened 2 years ago

anisabboud commented 2 years ago

Hello and thank you for this nice library.

I noticed that setting maxWidth/maxHeight and aspectRatio together doesn't work. \ The image is cropped to the requested aspect ratio, but not shrunk to the specified width/height.

Specifying only one works (only aspectRatio => image cropped, only maxWidth/maxHeight => image shrunk).

Is that the intended behavior or a bug?