Skip to content

Conversation

peacechen
Copy link

@peacechen peacechen commented May 19, 2024

Fixes #94

  • 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.

Also addresses #93 , #78 , #62, and #50.

The code in this PR has been published as @peacechen/react-image-file-resizer pending merge.

peacechen added 2 commits May 19, 2024 00:56
* Fix bug when maxHeight === minHeight && maxWidth === minWidth.
* 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.
@peacechen
Copy link
Author

Wrong source branch. Creating another one

@peacechen peacechen closed this May 19, 2024
@peacechen peacechen changed the title TypeScript refactor, fix exact sizing TypeScript refactor, fix exact sizing (wrong branch) May 19, 2024
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.

Exact sizing not respected
1 participant