Skip to content

fix: load_images passes float crop box to PIL - #103

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/image-load-images-passes-float-crop-box-to-pil
Open

fix: load_images passes float crop box to PIL#103
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/image-load-images-passes-float-crop-box-to-pil

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

Problem

fix: load_images passes float crop box to PIL

Fix

Replace:

        else:
            halfw, halfh = ((2*cx)//16)*8, ((2*cy)//16)*8
            if not (square_ok) and W == H:
                halfh = 3*halfw/4
            img = img.crop((cx-halfw, cy-halfh, cx+halfw, cy+halfh))

with:

        else:
            halfw, halfh = ((2*cx)//16)*8, ((2*cy)//16)*8
            if not (square_ok) and W == H:
                halfh = (3*halfw)//4
            img = img.crop((cx-halfw, cy-halfh, cx+halfw, cy+halfh))

Files changed

  • dust3r/utils/image.py

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