Skip to content

Issue #768: Support passing none to resize and crop image#1144

Merged
abidlabs merged 8 commits into
mainfrom
dawood/resize-image
May 3, 2022
Merged

Issue #768: Support passing none to resize and crop image#1144
abidlabs merged 8 commits into
mainfrom
dawood/resize-image

Conversation

@dawoodkhan82
Copy link
Copy Markdown
Collaborator

Description

Please include:

  • relevant motivation
  • a summary of the change
  • which issue is fixed.
  • any additional dependencies that are required for this change.

Closes: # (issue)
#768

Checklist:

  • I have performed a self-review of my own code
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@dawoodkhan82 dawoodkhan82 linked an issue May 2, 2022 that may be closed by this pull request
@dawoodkhan82 dawoodkhan82 requested a review from abidlabs May 2, 2022 09:04
Copy link
Copy Markdown
Member

@abidlabs abidlabs left a comment

Choose a reason for hiding this comment

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

Looks good!

Comment thread gradio/processing_utils.py Outdated
raise ValueError
return ImageOps.fit(img, size, centering=center)

if size[0] == None and size[1] == None:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe these should all be “is None” instead of “== None”

@abidlabs abidlabs merged commit 527abb2 into main May 3, 2022
@abidlabs abidlabs deleted the dawood/resize-image branch May 3, 2022 21:46
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.

gradio Image shape None for width or height

3 participants