Fix bug when maxHeight === minHeight && maxWidth === minWidth.
Additionally:
This project has been converted to TypeScript with a generated type definition file.
The main method imageFileResizer accepts an options object argument instead of multiple individual arguments.
It returns a Promise instead of using a callback.
This PR refactors the code as properly typed functions. The parameters are in a single options argument instead of multiple arguments. The TypeScript definition file is automatically generated. The major version was bumped due to breaking changes in the function signature.
Fixes https://github.com/onurzorluer/react-image-file-resizer/issues/94
Additionally:
This PR refactors the code as properly typed functions. The parameters are in a single options argument instead of multiple arguments. The TypeScript definition file is automatically generated. The major version was bumped due to breaking changes in the function signature.
Also addresses https://github.com/onurzorluer/react-image-file-resizer/pull/93 , https://github.com/onurzorluer/react-image-file-resizer/pull/78 , https://github.com/onurzorluer/react-image-file-resizer/issues/62, and https://github.com/onurzorluer/react-image-file-resizer/issues/50.
The code in this PR has been published as @peacechen/react-image-file-resizer pending merge.