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

update to jepler #2

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
3a75980
fix typos
jwilk Mar 14, 2017
28bc5a7
Merge pull request #34 from jwilk/spelling
jepler Mar 14, 2017
a697dc4
strip trailing whitespace
jwilk Mar 15, 2017
fbcda37
remove unused code
jwilk Mar 15, 2017
8e596e0
remove duplicated fcntl import
jwilk Mar 15, 2017
3e94db8
Merge pull request #35 from jwilk/whitespace
jepler Mar 15, 2017
fdabf8e
Merge pull request #37 from jwilk/fcntl
jepler Mar 15, 2017
cfa897f
Merge pull request #36 from jwilk/filechooser-main
jepler Mar 15, 2017
cdc489e
don't hardcode TIOCGWINSZ value
jwilk Mar 15, 2017
c001e92
Merge pull request #38 from jwilk/termios
jepler Mar 15, 2017
bf5f8d5
corrected lowercase naming issue in cropgtk.py
arcmags Apr 29, 2017
bd1fbfe
Merge pull request #40 from c-magyar/master
jepler Apr 30, 2017
aff540a
Copy file if no cropping or rotation is required.
arcmags May 7, 2017
e8a88e5
Merge pull request #41 from c-magyar/master
jepler May 7, 2017
60a94ed
update compat version to 9
xiota Jul 21, 2017
fb53da5
Merge pull request #44 from xiota/deb-pkg
jepler Jul 21, 2017
0fed172
Update cropgui.py
Aug 2, 2017
648c171
Merge pull request #47 from demerson3/patch-1
jepler Aug 2, 2017
4756d97
Added the list of packages needed for running on Fedora.
mlogic Sep 7, 2017
8a7aade
Switched from jpegexiforient to exiftool
mlogic Sep 7, 2017
3b4cc84
Merge branch 'master' of https://github.com/mlogic/cropgui
jepler Sep 7, 2017
0deb9e9
add new dependency to debian packaging
jepler Sep 7, 2017
f9fcff1
Prepare for 0.3 release
jepler Sep 30, 2017
0ff9b2f
Add install notes to README
isync Dec 23, 2017
a77e187
--amend last commit
isync Dec 23, 2017
15655ed
Merge pull request #54 from isync/master
jepler Dec 23, 2017
e761fe6
Note that I'm not actively developing this project
jepler Dec 25, 2017
7b37e28
Fix dpkg-genchanges warning
jepler Jan 14, 2018
a6e9388
Fix failure to build source archive
jepler Jan 14, 2018
95d61b9
Merge pull request #3 from jepler/master
reubot Jun 13, 2018
d28c6b3
Start GTK3 changes
reubot Jun 13, 2018
27ca72e
filechooser
reubot Jun 13, 2018
3067359
Minor glade updates
reubot Jul 1, 2018
806dcbc
Update cropgtk.py and filechoser.py to GTK3
reubot Jul 1, 2018
ac3e2d9
Merge pull request #57 from reubot/gtk3
jepler Jul 27, 2018
552ae7b
packaging: update for gtk3
jepler Jul 27, 2018
f264cfd
update to python3 using 2to3-2.7
reubot Sep 4, 2019
ef24623
update cropgui.py
reubot Sep 5, 2019
3610f0b
replace deprecated gobject functions
reubot Sep 5, 2019
954d859
Update Debian dependencies
reubot Sep 5, 2019
78db49a
Merge branch 'python3' of https://github.com/reubot/cropgui
jepler Sep 5, 2019
34c8fd6
Fix warning with Python 3.8 (is/==).
hannob Mar 5, 2020
e492f3b
Merge pull request #64 from hannob/py38_warning_fix
jepler Mar 5, 2020
2e2671b
Fix image scaling miscalculation.
waptaff Mar 7, 2020
c8f569c
Make image scaling use integer powers of two.
waptaff Mar 7, 2020
d7eaf1f
Merge pull request #65 from waptaff/integer-scaling
jepler Mar 9, 2020
e5695d7
install.sh: site_packages python3 support
spvkgn Mar 23, 2020
d1f99e0
Merge pull request #70 from spvkgn/site_packages_py3
jepler Mar 23, 2020
2625f2c
Use python3 in install.sh
spvkgn Mar 26, 2020
b9f6222
Merge pull request #71 from spvkgn/debian-new
jepler Mar 26, 2020
3b9f9f2
Update debian packaging files
spvkgn Mar 26, 2020
386d244
Merge pull request #72 from spvkgn/debian-new
jepler Mar 26, 2020
7cfebd4
Use integer division in `fix`
Apr 14, 2020
166ce79
Round right/bottom up instead of rounding down
Apr 14, 2020
ed8b91a
Automatically determine iMCU size
Apr 14, 2020
f18adb4
Deduplicate code in cropgui/cropgtk by moving to cropgui_common
Apr 14, 2020
c8c7f79
Round coordinates correctly for rotated images
Apr 14, 2020
be1a08b
Merge pull request #73 from jingw/improve-rounding
jepler Apr 15, 2020
8d26da5
Fix output name detection for non-jpeg files
City-busz Jun 10, 2020
8a518d8
Merge pull request #74 from City-busz/patch-1
jepler Jun 12, 2020
eebcdda
Fix cropping in python3
Jul 3, 2020
034fd33
Windows support
Jul 3, 2020
150facd
Merge pull request #79 from howff/feature-windows
jepler Jul 3, 2020
3df7aba
Consistent chooser parameter order.
Nov 2, 2020
5cc15b6
Fix broken install.
Nov 2, 2020
395624b
Create some JPGs for testing with.
Nov 2, 2020
627faa4
Revert "Consistent chooser parameter order."
Nov 3, 2020
e051ebb
Consistent chooser parameter order.
Nov 3, 2020
4acc9e6
Add keyboard controls.
Nov 3, 2020
c7ff104
Perfect crops.
Nov 3, 2020
fb5ff13
Merge pull request #81 from ConradHughes/cjch_updating
jepler Nov 5, 2020
4175b2c
Work around jpegtran to get correct rotated crops.
Nov 12, 2020
ec36625
Merge pull request #82 from ConradHughes/cjch_updating
jepler Nov 12, 2020
fb61164
Preserve previous crop
Nov 30, 2020
4ef13cb
Only use 'f' suffix when cropping JPEG (jpegtran)
Nov 30, 2020
a4489d9
GTK version also preserves previous crop
Nov 30, 2020
806f174
Need +repage otherwise subsequent crops fail
Nov 30, 2020
04d3e3e
Merge pull request #84 from howff/master
ConradHughes Apr 12, 2021
d1bbc67
Merge pull request #1 from jepler/master
ConradHughes Apr 12, 2021
30f8243
Better default window sizes on Gnome.
ConradHughes Apr 12, 2021
d745df1
OOB on rotate & non-crop of non-ICU-aligned images.
ConradHughes Apr 12, 2021
4afe934
Merge branch 'feature/better_window_sizing'
ConradHughes Apr 12, 2021
16eb2c2
Merge pull request #87 from ConradHughes/master
ConradHughes Apr 12, 2021
e64e456
Treat MPO files like JPEG files
Apr 15, 2021
a1883d6
closes #89
JoKalliauer Apr 19, 2021
539d097
Merge pull request #90 from JoKalliauer/patch-1
jepler Apr 19, 2021
6bb7c01
debian/changelog: Update package version
jepler Apr 19, 2021
9dbf930
Merge pull request #88 from howff/fix-format-mpo
jepler Apr 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 39 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ 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", a (usually?) 8x8 block of pixels. This
feature may have been pioneered by Guido of jpegclub.org some years ago.
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
Expand All @@ -22,15 +22,45 @@ 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. After releasing the mouse button, the cropped image
boundary may move a little bit; this represents the limitation that the
upper-left corner must be at a multiple of 8x8 original image pixels.
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.

cropgui is written in Python and requires python, python-tkinter,
python-imaging, python-imaging-tk, and libjpeg-progs. It is available under the
terms of the GNU GPL version 2 or later.
## 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)
* `jpegexiforient` to clear the EXIF rotation flag from jpeg output 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.
Loading