Skip to content

Multiple crops on same image saves only the last crop when specifying output format #23

@phanav

Description

@phanav

Hello Robert Węcławski, thank you for this amazing program.
It is the best image crop tool that I found.

I hope you will have a few minutes to fix this minor detail.
It has no critical impact on the usage.

Suppose we make multiple crops on the same original file : image.png.
Running inbac without format option gives the correct result: image1.png, image2.png, image3.png, ...
Running inbac with format option (inbac -f png) gives only one output, despite the multiple crop: image, a PNG file in the correct format but without the extension .png

Perhaps the cause lies in controller.py -> save and/or find_available_name
Maybe we can fix it like this:
controller.py -> save line 161

    if self.model.args.image_format:
        new_filename, _ = os.path.splitext(new_filename)
        new_filename = os.path.join(new_filename, self.model.args.image_format) 

Anyway, thank you for your attention and for sharing this application.

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