Giter Site home page Giter Site logo

jepler / cropgui Goto Github PK

View Code? Open in Web Editor NEW
83.0 7.0 28.0 953 KB

gtk frontend for lossless cropping of jpeg images

License: GNU General Public License v2.0

Python 92.45% Shell 7.55%
crop-image gtk hacktoberfest image image-processing lossless tk tkinter

cropgui's Introduction

A GTK GUI for lossless JPEG cropping

Of the pictures I'd like to put online, I've found that in 75% of the cases where I want to retouch the photo, it's to crop it and nothing else. Since I shoot in jpeg, it's a lossy process to load the jpeg in gimp, crop it, and write the result.

It turns out that debian's jpegtran has a "-crop" flag which performs lossless cropping of jpeg images as long as the crop is to a multiple of what the manpage calls the "iMCU boundary", usually an 8x8 or 16x16 block of pixels. This feature may have been pioneered by Guido of jpegclub.org some years ago.

There's apparently a nice Windows front-end to this program, but I didn't find a Linux one. So I wrote one! It's pretty basic, but it gets the job done. You can download it below.

To run cropgui, either list files on the commandline or select them from a file browser (in the latter case, you're returned to the browser after cropping the selected file(s); hit 'cancel' to exit completely). The output filename is chosen automatically, and never overwrites the original (but it will silently overwrite an earlier cropped version). For example, if the input is "moon.jpg" then the output is "moon-cropped.jpg".

Images are automatically scaled by a power of 2 (e.g., 1/2, 1/4 or 1/8) in order to fit onscreen. While dragging, the cropped image boundary will snap to a multiple of 8 or 16 pixels; this represents the limitation that the upper-left corner must be at a multiple of the iMCU blocks.

PREREQUISITES

cropgui is written in Python and requires the following packages:

  • Debian: python3, python3-pil, python3-pil.imagetk, (python-tkinter, python-imaging, python-imaging-tk on older systems), libjpeg-progs, and libimage-exiftool-perl.
  • Fedora: dnf install python2-pillow libjpeg-turbo-utils pygtk2 pygtk2-libglade ImageMagick and perl-Image-ExifTool python3-pillow-tk.

The specific external programs required are:

  • jpegtran to crop jpeg images (debian package: libjpeg-turbo-progs or libjpeg-progs)
  • exiftool to clear the EXIF rotation flag from jpeg output images (debian package: libimage-exiftool-perl)
  • convert to rotate and crop other image types (debian package: imagemagick or graphicsmagick-imagemagick-compat)
  • magick on Windows (download from ImageMagick and install)

INSTALLATION

Although there are packages in the making, for a system-wide install, first make sure prerequisites are met for your system and the "flavor" of cropgui you want to install. For the GTK version, you may skip the TK dependencies. But make sure jpegtran, exiftool and convert are installed.

Then do this on command line after cloning this repo:

$ sudo bash ./install.sh -p /usr -P /usr/bin/python

Where the -p flag tells install.sh to install to /usr instead of your home dir. And flag -P points to your python binary, which you can find via $ type python. You may set the optional -f flag to switch between tk and gtk (the default) flavor of the app.

Development status

The author (@jepler) is not actively developing this project. Issues and pull requests are not likely to be acted on. I would be interested in passing this project to a new maintainer.

LICENSE

cropgui is available under the terms of the GNU GPL version 2 or later.

cropgui's People

Contributors

alisterh avatar arcmags avatar beling avatar blun avatar city-busz avatar conradhughes avatar ddjepler avatar dubhater avatar hannob avatar isync avatar jepler avatar jokalliauer avatar jwilk avatar malenki avatar maxr1998 avatar mlogic avatar ndolam avatar pinkbyte avatar rafaqz avatar reubot avatar spvkgn avatar tstenner avatar waptaff avatar xiota avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cropgui's Issues

zoom functionality

Please implement control elements (and/or command line options) to manually change the zoom ratio of the image display. And maybe another one for toggling some MCU block boundary visualization.
As it is, pixel-exact placement of a crop boundary takes a lot of trial and error or even resorting to jpegtran on the command line.

Pillow

To make cropgui work with Fedora where Pillow replaces Image, one has to use

 from PIL import Image

Images rotated with Geeqie appear unrotated

The Tk version built from the source with the last commit 2016-11-02.

Geeqie has "[x] Write altered image orientation to the metadata" on the Metadata tab. sxiv and gpicshow display the image correctly.

cropgui does not properly handle paths containing spaces

Both when using the file browser to select images to crop and when passing (relative or absolute) paths from the command line, cropgui shows the image and you can select the crop area, but when trying to crop, it doesn't work. It just prints a message to the console that the file wasn't found.
The only working method (and only if just the folder names contain space but not the filename) is to cd into the directory containing the files, and then calling cropgui with a relative path (i.e. just the filename).

Application icon is too small

The "cropgui.png" icon used for the application is too small for application launchers used nowadays. Also, appstream-generator requires at least 48x48 icon to process the application, but preferably it needs 64x64 and 128x128 icons to show up in software catalog.

Please include a larger icon, or a scalable .svg icon in the project.

installation error

installation is giving following error on ubuntu 18.04 :
Installing gtk version of cropgui
*** Failed to import cropgui_common.py
You must add /usr/lib/python2.7/dist-packages to PYTHONPATH

cropgui 0.4 cropping wrong area

I have recently updated to the python3/0.4 version of cropgui and it seems to me something is broken, it's not cropping the area that I see on the GUI.

I'm attaching 2 images that show this, 1st is the GUI, which you can see is clearly around a black rectangle on the image:
screenshot-cropgui

So I'd expect a black rectangle with some white around it. But what I get is only the upper left corner of what I expect:
x-crop

functionality to join images

Functionality to join several JPEG images together (like jpegjoin) would be very nice indeed.
Functionality to (automatically?) integrate some (heavily) altered blocks from an edited JPEG file into an existing original file would be even nicer; e.g. for removing watermarks or other edits that only affect parts of the image. (Well, an export option in The GIMP would be even more useful...)
This feature would require a special jpegtran patch ("droppatch"), though.

Migration to pillow-7.0.0 and python-3?

On Gentoo the very last development version conflicts about python pillow library:

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-python/pillow:0

  (dev-python/pillow-7.0.0:0/0::gentoo, ebuild scheduled for merge) USE="jpeg lcms tiff truetype zlib -doc -examples -imagequant -jpeg2k -test -tk -webp" ABI_X86="(64)" PYTHON_TARGETS="python3_6 -python3_7 -python3_8" conflicts with
    dev-python/pillow[python_targets_python2_7(-),-python_single_target_python2_7(-)] required by (media-gfx/cropgui-9999:0/0::gentoo, installed) USE="" ABI_X86="(64)" PYTHON_TARGETS="python2_7"

As far as I understand, the cropgui depends on pillow with python2_7 support where pillow-6.2.2 is the last matching. The new pillow-7.0.0 only supports python3_6, 3_7 and 3_8.
cropgui itself on Gentoo is depending on python2_7 and thus being masked due to global distribution migration to python3.

Are there plans to migrate to python3?

get_primary_monitor() doesn't work with Wayland and is deprecated

Trying to run the latest cropgui (cropgtk.py) on Ubuntu 21.04 fails with:

$ ./cropgtk.py 
Traceback (most recent call last):
  File "/tmp/./cropgtk.py", line 223, in <module>
    wa = display.get_primary_monitor().get_workarea()
AttributeError: 'NoneType' object has no attribute 'get_workarea'

I figured out that get_primary_monitor() returns None in my configuration because Ubuntu 21.04 introduced Wayland as a default.

Wayland doesn't provide the necessary API for this function and it seems GTK will also deprecate it in 4.0:
https://gitlab.gnome.org/GNOME/gtk/-/issues/1028

Applying the following patch fixes the issue for me:

--- cropgtk_orig.py	2021-10-04 20:33:02.398149075 +0200
+++ cropgtk.py	2021-10-04 20:34:04.880647475 +0200
@@ -220,7 +220,7 @@
         return self.result
 
 display = gdk.Display().get_default()
-wa = display.get_primary_monitor().get_workarea()
+wa = display.get_monitor(0).get_workarea()
 max_h = wa.height - 192
 max_w = wa.width - 64

make python3 release

Given the upcoming python2 deprecation it'd be nice to have a release of cropgui supporting python 3.
I saw that changes have been merged to make it python3-compatible, but there's no release yet with these changes.

Snap to grid should always be outwards with respect to cropped area

At the moment all four coordinates (top, bottom, left, right) are rounded down to block boundaries at the end of a drag. This is slightly undesirable because, while any area of the image inside the top and left bounds is guaranteed to be within the crop, you may lose several pixels from the bottom and right edges. I think a situation where the bottom and right edges are rounded up would be an improvement, as you could then draw the crop as close to your target as you could, and be guaranteed that all of the area you selected would be preserved in the final crop.

The fix is pretty straightforward I think/hope:

diff --git a/cropgui_common.py b/cropgui_common.py
index 270aa69..0cb24b5 100755
--- a/cropgui_common.py
+++ b/cropgui_common.py
@@ -136,7 +136,7 @@ class DragManagerBase(object):
         a = clamp(a, 0, lim)
         b = clamp(b, 0, lim)
         a = (a / self.round)*self.round
-        b = (b / self.round)*self.round
+        b = ((b + self.round - 1) / self.round)*self.round
         return int(a), int(b)
 
     def get_corners(self):

EXIF autorotate not effective for final output

It's a nice surprise that cropgui autorotates images on load based on EXIF info from my gravity sensors. But that works only until a cropping result gets saved: That is not rotated anymore and on top of that it seems to loose the orientation tag/EXIF info.

Option to deactivate lossy edge transformation

While lossy edge transformation is a really useful feature, I'd like an option to deactivate it and instead restrain cropping to 8/16 pixel blocks also for the right-hand and bottom sides.

rotate buttons reversed

the rotate buttons have the opposite effect to what they are advertised to do.
Still true at least until git master of Feb 21, 2014

While I drag, show in realtime where the crop would happen

Let's say I want to crop out a white margin:

  1. I move the crop line to be exactly on the border.
  2. When I release the mouse, the line jumps a few pixels into the white.
  3. I move the crop line back inside the picture (I prefer cropping a bit of picture rather than having some white).
  4. When I release the mouse, the line jumps a few pixels into the picture.
  5. I repeat the operation to make sure I have the best compromise line.
    Repeat for left top right bottom.
    That takes a lot of time.

A better solution would be to show the line where the crop would happen.
Actually the older cropgui.py does that, so it would be a matter of implementing the same in cropgtk.py

GTK+ version confused by EXIF rotation

When the GTK+ version of cropgui displays images, it automatically rotates them in accordance with their EXIF rotation data. However, the interactive cropping tool seems to interpret the image's dimensions as if it were unrotated. It prevents the user from expanding or moving the cropping area outside the unrotated dimensions.

The Tkinter version does not have this problem because it does not do autorotation.

Some JPEGs are identified as MPOs

Due to a "feature" of the Python imaging library Pillow/PIL some JPEGs are identified as MPO, i.e. when jpegcrop checks for image.format=="JPEG" it misses those JPEG images where image.format=="MPO".

python-pillow/Pillow#4603

MPO files are normal JPEG images but contain a tag which can contain other data which may be additional JPEG images, possibly stereoscopic or sometimes a larger thumbnail.

If the utilities which jpegcrop calls (exiftool, jpegtran) can handle MPO-style JPEG then jpegcrop can simply check for =="MPO" as well as =="JPEG". If there is a danger that the user will get unexpected behaviour (eg. a loss of valuable data) then a warning should be issued first.

In my case it's simply a regular JPEG from a Canon camera, I've no idea why it's MPO and not JPEG, so I just want it handled exactly the same as a JPEG.

zoom feature

Feature request: I am missing a zoom feature. (The "power-of-two autozoom" often leaves me with only a tiny preview image.)

python/python2

Thanks for writing this, its perfect for my needs - quickly cropping and rotating linked images in a markdown writing setup.

I'm just wondering if there a reason #!/usr/bin/python is used everywhere instead of specifying #!/usr/bin/python2?

Running ./cropgtk.py on arch linux (and sooner or later other places) is going to give a syntax error as python links to python3.

Would it be possible to use python2 explicitly?

dependency list for Debian in README outdated

python-tkinter is now called python-tk,
python-imaging is now python-pil,
python-imaging-tk is now python-pil.imagetk, and
libjpeg-progs is now libjpeg-turbo-progs.
I additionally had to install python-gi.
Running cropgui.py still fails because "ImportError: No module named ImageTk".

BTW: You should probably add instructions on how to reverse the sudo bash ./install.sh -p /usr -P /usr/bin/python

Does not work on Debian testing

My existing package of cropgui stopped working recently, saying:

Traceback (most recent call last):
  File "/usr/bin/cropgui", line 22, in <module>
    import ImageTk
ImportError: No module named ImageTk

I installed a package made from a6e9388 using checkinstall ./install.sh -p /usr -P /usr/bin/python. The result when running cropgui:

Traceback (most recent call last):
  File "/usr/bin/cropgui", line 25, in <module>
    import filechooser
ImportError: No module named filechooser

If I build with -f tk, the former error appears.

Does not crop to the correct area

The cropped file is not the same area selected in the GUI.
I noticed that the initial crop rectangle is actually larger than the window and is partially off-screen so all crop coordinates will be wrong.
I think the fix is this: use // instead of / in both files which do this:

        drag.scale = max (drag.scale, (drag.w-1)//max_w+1)
        drag.scale = max (drag.scale, (drag.h-1)//max_h+1)
        thumbnail.thumbnail((drag.w//drag.scale, drag.h//drag.scale))

Is that a correct deduction and solution?
Would you like a pull request for this?

cannot import name 'ImageTk' from 'PIL' with Python 3.9

I run the following code on Fedora 33:

sudo dnf install python2-pillow libjpeg-turbo-utils pygtk2 pygtk2-libglade ImageMagick perl-Image-ExifTool python3-pillow python3-tkinter  python2-tkinter python3-gobject python-pillow python3-distutils-extra
git clone https://github.com/jepler/cropgui.git
cd cropgui
sudo bash ./install.sh -p /usr -P /usr/bin/python
cropgui

returns

Traceback (most recent call last):
  File "/usr/bin/cropgui", line 22, in <module>
    from PIL import ImageTk
ImportError: cannot import name 'ImageTk' from 'PIL' (/usr/lib64/python3.9/site-packages/PIL/__init__.py)

Versions

Operation system: Linux version 5.11.14-200.fc33.x86_64 ([email protected]) (gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9), GNU ld version 2.35-18.fc33) #1 SMP Wed Apr 14 15:25:53 UTC 2021

Python 3.9

DNF: Versions

$ sudo dnf install python2-pillow libjpeg-turbo-utils pygtk2 pygtk2-libglade ImageMagick perl-Image-ExifTool python3-pillow python3-tkinter  python2-tkinter python3-gobject python-pillow python3-distutils-extra
Letzte Prüfung auf abgelaufene Metadaten: vor 0:33:12 am Mo 19 Apr 2021 11:02:27.
Das Paket python2-pillow-6.2.2-5.fc33.x86_64 ist bereits installiert.
Das Paket libjpeg-turbo-utils-2.0.5-5.fc33.x86_64 ist bereits installiert.
Das Paket pygtk2-2.24.0-33.fc33.x86_64 ist bereits installiert.
Das Paket pygtk2-2.24.0-33.fc33.x86_64 ist bereits installiert.
Das Paket ImageMagick-1:6.9.11.27-1.fc33.x86_64 ist bereits installiert.
Das Paket perl-Image-ExifTool-12.00-2.fc33.noarch ist bereits installiert.
Das Paket python3-pillow-7.2.0-5.fc33.x86_64 ist bereits installiert.
Das Paket python3-tkinter-3.9.2-1.fc33.x86_64 ist bereits installiert.
Das Paket python2.7-2.7.18-8.fc33.x86_64 ist bereits installiert.
Das Paket python3-gobject-3.38.0-2.fc33.x86_64 ist bereits installiert.
Das Paket python3-pillow-7.2.0-5.fc33.x86_64 ist bereits installiert.
Das Paket python3-distutils-extra-2.39-18.fc33.noarch ist bereits installiert.
Abhängigkeiten sind aufgelöst.
Nichts zu tun.
Fertig.

Install script ignores arguments to -p option.

I just made a Slackware build script for this project, and in the course of doing so noticed that the argument to the -p option described in the install.sh usage is never actually used; if the option is used, the prefix is always determined automatically regardless of argument.

Won't build on stretch (Debian 9)

Two problems building on stretch:

  1. depends on python-support (not in stretch) and
  2. has a debian/compat of 4 (no longer supported by stretch).

Workaround for the time being:

  1. running debuild -d (ignore dependencies) and
  2. change debian/compat to 5 (unsure of the full implications of this).

install.sh doesn't work correctly if -p is given before -P

There is a bug in install.sh
If I do this:

./install.sh -p /usr -P /usr/bin/python2 

then I get this, and the files are not installed properly:

  File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_python_lib()
                                              ^
SyntaxError: invalid syntax
Installing gtk version of cropgui
Installed cropgui gtk

If I do this it works:

./install.sh -P /usr/bin/python2  -p /usr

Release 0.5

Due to the image scaling bug [1] cropgui 0.4 is not really usable.
Can we have a 0.5 release?

[1] 2e2671b

Can't make it work on Linux Mint 18.1

Hi, I can't use the program. I installed it

./install.sh -f gtk -p /usr/local/

When it opens, and then go to choose 1 image, it displays this error.

Stepconf encountered an error.  The following information may be useful in troubleshooting:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/filechooser.py", line 28, in update_preview_cb
    pixbuf = gtk.gdk.pixbuf_new_from_data(i.tostring(),
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.

I press OK (chosing the image to open), I press open, and no image is displayed
Instead, I get this error

Stepconf encountered an error.  The following information may be useful in troubleshooting:

Traceback (most recent call last):
  File "/usr/bin/cropgui", line 164, in do_render
    pixbuf = gtk.gdk.pixbuf_new_from_data(rendered.tostring(),
  File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 695, in tostring
    "Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.

Thanks, I am on Linux Mint 18.1 64 bits

cropgui will happily open non-JPEG images

cropgui cats.png will quite happily open, show, and let you prepare to crop a PNG image, save, and write garbage to cats-crop.jpg, all while showing an error only on stderr.

Seems easy to guard against.

Thread exception when cropping

Whenever I press the "Crop" button in the GTK+ version of cropgui, the following is output to the console:

nice jpegtran -copy all -crop 3832x2984+720+0 -outfile /tmp/foo-crop.jpg foo.jpg
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/cropgui_common.py", line 87, in runner
    subprocess.call(["jpegexiforient", "-1", target])
  File "/usr/lib64/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

The cropped file is nonetheless successfully written.

Feature Wish: Cropping, without resetting crop-selection to full image size

There should be a way to crop, without resetting the crop-selection to full image-size.
This would be helpful, when many images would needed to be cropped at the same position.
(For screenshots, where certain areas should be cropped, this would be very helpful.)

I think the easiest way to have this is with a second crop-button (instead of key-binding).
YMMV.

Use python3

Python2 will be officially dead by 2020. As the codebase here is small, it shouldn't be too costly to migrate.

exit status

it would be useful if cropgui returned a non-zero exit status in cases where it terminates without doing any cropping

Don't override files uncondicionally

Currently cropgui does not ask the user for confirmation when the specified file is already exists, and overwrites that file.

Please add a simple dialog to confirm overwriting existing files.

You must add /usr/lib/python3/dist-packages to PYTHONPATH

Hi!

I am finding some trouble when installing this.
after
sudo bash ./install.sh -p /usr -P /usr/bin/python
i get this error
Installing gtk version of cropgui *** Failed to import cropgui_common.py You must add /usr/lib/python3/dist-packages to PYTHONPATH

I have tried this
export PYTHONPATH=${PYTHONPATH}:"/usr/lib/python3/dist-packages"
but same error.

I am not an expert user of linux so really don't know what to do next.
Thank you.

install.sh mixes python3 script with python2 modules

after ./install.sh -f gtk -t $pkgdir -p /usr -P /usr/bin/python and packaging cropgui for Arch Linux I get a python3 script:

$ head -1 /usr/bin/cropgui
#!/usr/bin/python3

with python2 modules:

$ pacman -Ql cropgui | grep python2.7
cropgui /usr/lib/python2.7/
cropgui /usr/lib/python2.7/site-packages/
cropgui /usr/lib/python2.7/site-packages/cropgui.glade
cropgui /usr/lib/python2.7/site-packages/cropgui_common.py
cropgui /usr/lib/python2.7/site-packages/filechooser.py
cropgui /usr/lib/python2.7/site-packages/stock-rotate-270-16.png
cropgui /usr/lib/python2.7/site-packages/stock-rotate-90-16.png

This of course does not work:

$ cropgui
/usr/bin/cropgui:294: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif image_type is "jpeg":
Traceback (most recent call last):
  File "/usr/bin/cropgui", line 18, in <module>
    from cropgui_common import *
ModuleNotFoundError: No module named 'cropgui_common'

thumbnail is included without being cropped

Hi,

the code calls jpegtran with -copy all. This will include the original thumbnail. If cropgui is used to remove, problematic parts from an image, like copyrighted material or private material, then those will still be retained in the image. To fix this either:

  • also crop the thumbnail
  • don't include the thumbnail
  • inform the user, that the data is still retained in the thumbnail

Thanks!

key bindings

I would expect CTRL-Q to quit. (would be awesome to cancel the last operation to avoid a quit/re-run)

File permission bug while building .deb

Great tool — thanks very much for creating it!

Encountered one problem while building: just using 'cp' to install files means that if the person who cloned or built cropgui has a private umask (e.g. umask 077), the files get put into the .deb with permissions that make them unusable after install. Switching from cp to using "install -m 0755" for executables and 0644 for non-executables should solve the problem,

Launch from Nautilus right-click

When browsing pictures in Nautilus, once in a while I find one picture that I would like to crop.
For me it is never the other way, I never first start CropGTK then try to find images to crop.

So, making CropGTK accessible from a Nautilus right-click would be a huge time saver.

Thanks!

Should consider IMCU size

Currently, cropgui changes size and position of the region to crop in steps of 8 pixels. This is because lossless cropping is only possible at multiplies of the IMCU size, which is often 8.
However, other values of the IMCU size do occur. At least 16 is also common, maybe others too.
Cropgui should read the IMCU size and use it instead of the fixed value 8 (round in DragManagerBase).

Unfortunately I could not find out how to read IMCU size from a JPEG.

Don't lowercase filenames if possible

According to the README, cropgui's "output filename is chosen automatically". The general algorithm seems to be "lowercase the basename, add -crop to it, and then add the original suffix". So if you run cropgui on FOO.JPG, then output is foo-crop.JPG.

I find the decision to lowercase the basename rather baffling. Why not leave the basename as-is?

Make some crop parameters editable

Most of the time I'm cropping a photo, I'm either cutting height or width by half, or cropping at 3/4ths x 3/4ths, so I know the end values. I used to use gwenviews crop tool, which allows me to enter those values by hand, and the the mouse to position the 'cage' in the photo. I would be nice if cropgui would at least allow to edit hose (height and width), altho gwenview also allows editing top and left. An image is worth a thousand words....

Screenshot_20201123_220910

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.