Skip to content

Fix: ensure resize dimensions are at least 1 to prevent PIL error#176

Open
greyfilm wants to merge 1 commit intodeepghs:mainfrom
greyfilm:main
Open

Fix: ensure resize dimensions are at least 1 to prevent PIL error#176
greyfilm wants to merge 1 commit intodeepghs:mainfrom
greyfilm:main

Conversation

@greyfilm
Copy link

What happened: When the detected area is smaller than the radius, width // radius becomes 0, causing a PIL error.
What I did: Added max(1, ...) to ensure the resize target is at least 1x1.

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.

1 participant