Skip to content

Cropping landscape image calculation seems to be wrong #23

@lanewinfield

Description

@lanewinfield

I noticed I was getting errors on cropping images that were landscape—as far as I can tell, the middle crop_rectangle command in instaxImage.py is calculated incorrectly. Here's my hacky version that works:

elif crop_type == 'middle':
       box = (int(round((img.size[0] - size[0]) / 2)), 0,
               int(round(((img.size[0] - size[0])/2)+size[0])), img.size[1])
        print(box)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions