Code Monkey home page Code Monkey logo

inbac's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

inbac's Issues

Linux install package fail becaus of font problem

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

Add error message when you use wrong path

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?

  • Run application with path where you doesn't have permission to create directories
  • Run application with path to folder which doesn't exist but in path where you have permission to create

Add menu

Add menu to let users set settings currently available only as command line arguments.

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

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.

Crop to clipboard & small crop size

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 :

  1. An option to add cropped image to clipboard instead of saving it

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

  1. Along with a copy option, a way to copy the whole picture if no cropping is necessary.
  2. A way to jump to a specific image (i.e. image 145/312) without having to scroll through all images.
  3. An option to prevent inbac from resizing images to a specific size if they are smaller (didn't try much, but if I'm correct setting a size like 1280x720 will upscale a 640x360 picture).
  4. As you described in #17

Thank you again for your incredible tool ! It made my job a bit faster and easier.

Add parameters to set saved images format and quality

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.

Add about dialog

Add about dialog with program description and current version

Add settings dialog

Add settings dialog to menu to let user set settings currently available as command line arguments.

Implement drag selection

Holding Shift or CTRL and moving mouse with pressed left mouse button should move the selection.

Add ability to rotate the image

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.