{"id":15640336,"url":"https://github.com/jepler/cropgui","last_synced_at":"2025-04-05T13:05:28.136Z","repository":{"id":14346394,"uuid":"17055980","full_name":"jepler/cropgui","owner":"jepler","description":"gtk frontend for lossless cropping of jpeg images","archived":false,"fork":false,"pushed_at":"2024-10-29T01:01:41.000Z","size":993,"stargazers_count":85,"open_issues_count":23,"forks_count":27,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-02T22:44:56.349Z","etag":null,"topics":["crop-image","gtk","hacktoberfest","image","image-processing","lossless","tk","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jepler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-21T12:45:35.000Z","updated_at":"2025-03-31T18:41:31.000Z","dependencies_parsed_at":"2024-04-15T14:05:08.061Z","dependency_job_id":"803dfd56-1516-421b-b083-6960a1fb4a54","html_url":"https://github.com/jepler/cropgui","commit_stats":{"total_commits":205,"total_committers":32,"mean_commits":6.40625,"dds":0.551219512195122,"last_synced_commit":"6ff0996771f5ec8fe1bce86dd8c3606e77d21433"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepler%2Fcropgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepler%2Fcropgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepler%2Fcropgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jepler%2Fcropgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jepler","download_url":"https://codeload.github.com/jepler/cropgui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339155,"owners_count":20923014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crop-image","gtk","hacktoberfest","image","image-processing","lossless","tk","tkinter"],"created_at":"2024-10-03T11:34:18.514Z","updated_at":"2025-04-05T13:05:28.112Z","avatar_url":"https://github.com/jepler.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A GTK GUI for lossless JPEG cropping\n\nOf the pictures I'd like to put online, I've found that in 75% of the cases\nwhere I want to retouch the photo, it's to crop it and nothing else. Since I\nshoot in jpeg, it's a lossy process to load the jpeg in gimp, crop it, and\nwrite the result.\n\nIt turns out that debian's jpegtran has a \"-crop\" flag which performs lossless\ncropping of jpeg images as long as the crop is to a multiple of what the\nmanpage calls the \"iMCU boundary\", usually an 8x8 or 16x16 block of pixels.\nThis feature may have been pioneered by Guido of jpegclub.org some years ago.\n\nThere's apparently a nice Windows front-end to this program, but I didn't find\na Linux one. So I wrote one! It's pretty basic, but it gets the job done. You\ncan download it below.\n\nTo run cropgui, either list files on the commandline or select them from a file\nbrowser (in the latter case, you're returned to the browser after cropping the\nselected file(s); hit 'cancel' to exit completely). The output filename is\nchosen automatically, and never overwrites the original (but it will silently\noverwrite an earlier cropped version). For example, if the input is \"moon.jpg\"\nthen the output is \"moon-cropped.jpg\".\n\nImages are automatically scaled by a power of 2 (e.g., 1/2, 1/4 or 1/8) in\norder to fit onscreen. While dragging, the cropped image boundary will snap\nto a multiple of 8 or 16 pixels; this represents the limitation that the\nupper-left corner must be at a multiple of the iMCU blocks.\n\n## PREREQUISITES\n\ncropgui is written in Python and requires the following packages:\n * Debian: python3, python3-pil, python3-pil.imagetk, libjpeg-turbo-progs\n   (python-tkinter, python-imaging, python-imaging-tk, libjpeg-progs on older systems),\n   and libimage-exiftool-perl.\n * Fedora: `dnf install python2-pillow  libjpeg-turbo-utils  pygtk2 pygtk2-libglade  ImageMagick  and perl-Image-ExifTool python3-pillow-tk`.\n\nThe specific external programs required are:\n * `jpegtran` to crop jpeg images (debian package: libjpeg-turbo-progs or libjpeg-progs)\n * `exiftool` to clear the EXIF rotation flag from jpeg output images (debian package: libimage-exiftool-perl)\n * `convert` to rotate and crop other image types (debian package: imagemagick or graphicsmagick-imagemagick-compat)\n * `magick` on Windows (download from ImageMagick and install)\n\n## INSTALLATION\n\nAlthough there are packages in the making, for a system-wide install, first make sure\nprerequisites are met for your system and the \"flavor\" of cropgui you want to install.\nFor the GTK version, you may skip the TK dependencies. But make sure `jpegtran`, `exiftool`\nand `convert` are installed.\n\nThen do this on command line after cloning this repo:\n\n    $ sudo bash ./install.sh -p /usr -P /usr/bin/python\n\nWhere the _-p_ flag tells install.sh to install to /usr instead of your home dir. And\nflag _-P_ points to your python binary, which you can find via _$ type python_. You may\nset the optional -f flag to switch between _tk_ and _gtk_ (the default) flavor of the app.\n\n## Development status\n\nThe author (@jepler) is not actively developing this project.\nIssues and pull requests are not likely to be acted on.\nI would be interested in passing this project to a new maintainer.\n\n\n## LICENSE\ncropgui is available under the terms of the GNU GPL version 2 or later.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjepler%2Fcropgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjepler%2Fcropgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjepler%2Fcropgui/lists"}