Skip to content

Conversation

@badGarnet
Copy link
Collaborator

@badGarnet badGarnet commented Oct 16, 2023

  • fix a bug where zoom factor <= 0 raises an exception at runtime
  • now zoom factor <=0 will result in no scaling of the image

Related report from user: https://unstructuredw-kbe4326.slack.com/archives/C044N0YV08G/p1697456659162509

Test:
This PR adds a unit test with cases where zoom factor is 0 or -1. Without this fix the same error the user reported shows up:

error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'

- fix a bug where zoom factor <= 0 raises an exception at runtime
- now zoom factor <=0 will result in no scaling of the image
@badGarnet badGarnet marked this pull request as ready for review October 16, 2023 21:45
Copy link
Contributor

@benjats07 benjats07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@badGarnet badGarnet merged commit 63eecdf into main Oct 16, 2023
@badGarnet badGarnet deleted the fix/invalid-zoom branch October 16, 2023 22:01
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.

3 participants