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

img has been cut off abnormally #119

Merged
merged 2 commits into from
Apr 12, 2022
Merged

Commits on Apr 12, 2022

  1. img has been cut off abnormally

    assume We have an image, with a width of 352 and a high of 31, and the `min_dimensions` is 32 $\times$ 32. Then it's qualified `any` judgment. Image 352$\times$31 is being pasted to a new blank Image whose size is 32 $\times$ 32. 
    
    ```python
            if any([s < min_dimensions[i] for i, s in enumerate(img.size)]):
                padded_im = Image.new('L', min_dimensions, 255)
                padded_im.paste(img, img.getbbox())
                img = padded_im
    ```
    TITC committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    06a80a7 View commit details
    Browse the repository at this point in the history
  2. formatting

    lukas-blecher committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    7e06bd6 View commit details
    Browse the repository at this point in the history