Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent null render size #78

Merged
merged 6 commits into from
Feb 27, 2023
Merged

Prevent null render size #78

merged 6 commits into from
Feb 27, 2023

Conversation

AnonymouX47
Copy link
Owner

Closes #75

  • Modifies image size computation (BaseImage._valid_size()) to ensure 0 is never returned for either dimension.
  • Modifies image,rendered_size to never contain a zero, no matter the scale.
  • "Image size or scale too small" exception can no longer be raised at render time.

- Change: Ensure `_valid_size()` never returns zero for either
  dimension.
- Change: Ensure `image.rendered_size` never returns zero for either
  dimension. By implication, render size also can never contain zero.
- Change: Ensure `image.rendered_width` and `image.rendered_height`are
  never zero.
- Change: Handle any exception, not just `ValueError`.
- Change: Make the error message generic.
@AnonymouX47 AnonymouX47 added common Related to the interface common to all render styles improvement Implementation of improvement to an existing feature labels Feb 26, 2023
@AnonymouX47 AnonymouX47 added this to the 0.6.0 milestone Feb 26, 2023
@AnonymouX47 AnonymouX47 changed the title Prevent zero render size Prevent null render size Feb 27, 2023
@AnonymouX47 AnonymouX47 merged commit 8a442e7 into main Feb 27, 2023
@AnonymouX47 AnonymouX47 deleted the prevent-zero-size branch February 27, 2023 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to the interface common to all render styles improvement Implementation of improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

convert_resize_img should not crash if it can't resize the image
1 participant