weclaw1 / inbac Goto Github PK
View Code? Open in Web Editor NEWPython application for fast interactive image cropping
License: MIT License
Python application for fast interactive image cropping
License: MIT License
Currently crops folder is created when folder with images is opened.
Usability would be better if application will create crops folder when image is cropped.
Hi
When trying to run the file in linux package (inbac-Linux.zip in releases), I get warnings and error message, complaining about fonts:
[seb@surface3 Téléchargements]$ ./inbac
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-sub-pixel-rgb.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-yes-antialias.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/48-spacing.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/70-no-bitmaps.conf", line 4: unknown element "description"
Traceback (most recent call last):
File "inbac/inbac.py", line 40, in
File "inbac/inbac.py", line 34, in main
File "inbac/inbac.py", line 16, in init
File "inbac/view.py", line 22, in init
File "inbac/view.py", line 44, in create_menu
File "tkinter/init.py", line 3272, in init
File "tkinter/init.py", line 2567, in init
_tkinter.TclError: failed to allocate font due to internal system font engine problem
[5695] Failed to execute script inbac
Confirmation dialog should be optional (behind a flag), because the program should be as fast as possible.
When I run the application with not existing directory, app just pop out, exit and send exception to terminal
Traceback:
File "<string>", line 1, in <module>
File "/home/jarek/Downloads/Archives/inbac-master/inbac/inbac.py", line 34, in main
app = Application(args.parse_arguments(), master=root)
File "/home/jarek/Downloads/Archives/inbac-master/inbac/inbac.py", line 24, in __init__
os.makedirs(args.output_dir)
File "/usr/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user'
In another case application just created directory and do nothing.
How reproduce this?
Add menu to let users set settings currently available only as command line arguments.
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.
Hi !
First, thank you for this very useful tool. It helped me a lot for a job.
When I was using it, I had some feature ideas that could further improve this tool.
For my job, I need to individually analyze and, if necessary, crop, copy and paste into a single Word document a lot of pictures (500 to 1700 for each task). Here are my ideas :
I managed to do something similar using a very basic batch script in the "crops" folder with a loop saving new files to clipboard using nircmd from NirSoft, it saved me a lot of time :
@echo off
:loop
FOR /F "delims=" %%I IN ('DIR "*.*" /A-D /B /O:D') DO SET "Last=%%I"
"**nircmd directory**\nircmd.exe" clipboard copyimage "%Last%"
goto :loop
stop
Thank you again for your incredible tool ! It made my job a bit faster and easier.
Currently images are saved in the same format as they were when they were opened. In case of PNG files they won't lose quality, but in case of JPEG images they will be saved with Pillow default, which is 75 out of 100.
Poetry could not find a pyproject.toml file in C:\Users\mega or its parents
Separate GUI and logic to make application simpler and simplify writing tests
Add about dialog with program description and current version
Add settings dialog to menu to let user set settings currently available as command line arguments.
Holding Shift or CTRL and moving mouse with pressed left mouse button should move the selection.
In current version images stay in memory after displaying them on canvas. They should be removed from memory after changing because it can be a problem when folder with many/large images is opened.
In the current version of the program current working directory is selected if input directory is not specified. File dialog asking the user for folder with images is more user friendly.
Rotating the image is something that would be useful to me, because some images I crop are upside down. Pressing c will rotate the image by 90 degree.
Currently if nothing is selected and Z is pressed, picture is changed to the next image. Going to the next image without saving the image should be only possible after pressing right mouse button or right arrow.
Hello, Robert Węcławski.
It would be better so you can see images in input folder.
and it would be better if you can select output folder of your crops
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.