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

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

Open
phanav opened this issue May 15, 2021 · 0 comments

Comments

@phanav
Copy link

phanav commented May 15, 2021

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.

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

No branches or pull requests

1 participant