{"id":17284832,"url":"https://github.com/technopagan/adept-jpg-compressor","last_synced_at":"2025-04-07T06:06:54.193Z","repository":{"id":141385779,"uuid":"9758691","full_name":"technopagan/adept-jpg-compressor","owner":"technopagan","description":"A Bash script to automate adaptive JPEG compression using common CLI tools","archived":false,"fork":false,"pushed_at":"2019-11-01T09:45:50.000Z","size":4237,"stargazers_count":378,"open_issues_count":15,"forks_count":27,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-31T04:06:56.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/technopagan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-04-29T21:47:07.000Z","updated_at":"2025-03-02T07:48:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1eb1bd4-a2c2-4a90-9144-3fe3f3b3906a","html_url":"https://github.com/technopagan/adept-jpg-compressor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technopagan%2Fadept-jpg-compressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technopagan%2Fadept-jpg-compressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technopagan%2Fadept-jpg-compressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technopagan%2Fadept-jpg-compressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technopagan","download_url":"https://codeload.github.com/technopagan/adept-jpg-compressor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601447,"owners_count":20964864,"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":[],"created_at":"2024-10-15T09:54:58.732Z","updated_at":"2025-04-07T06:06:54.167Z","avatar_url":"https://github.com/technopagan.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Adept - the adaptive JPG Compressor\n====================\n\n## Quick Start\n\n* Please install [a MSS saliency algorithm binary](http://github.com/technopagan/mss-saliency), [ImageMagick](http://www.imagemagick.org/), [MozJPEG](https://github.com/mozilla/mozjpeg) and [JPEGrescan](https://github.com/kud/jpegrescan)\n* Make MozJPEG available as \"mozjpeg\" in your $PATH, e.g. via symlink\n* Fetch a copy of [adept](https://raw.github.com/technopagan/adept-jpg-compressor/master/adept.sh) and place it somewhere you deem a good place for 3rd party shellscripts, e.g. \"/usr/local/bin\". Make sure the location is in the $PATH of the user(s) who will run adept and ensure that the script is executable (chmod -x).\n* Symlink it as \"adept\" for your own convenience\n* Now you can run \"adept /path/to/image.jpg\" to compress JPEGs far more effectively!\n\n## Introduction\n\nWhen compressing JPEG images, the same compression level is used on the entire image. However, most JPEG images contain homogeneous and heterogeneous areas, which are varyingly well-suited for compression. Compressing heterogeneous areas in JPEGs to reduce filesize causes [compression artefacts](https://en.wikipedia.org/wiki/Compression_artifact) due to the lossy nature of JPEG compression.\n\nThis script adaptively alters the compression level for areas within JPEGs (per-block) to achieve optimized file size while maintaining a decent visual quality. This script achieves a significantly reduced file size compared to standard tools such as cjpeg while maintaining good visual quality, as can be measured via SSIM. This is good news for the [Web Performance](https://twitter.com/search?q=%23WebPerf\u0026src=typd) and thus Web Developer community to achieve a great user experience on websites.\n\n## Example\n\nBest quality/size:\n\n```\n$ convert -verbose -quality 100 images/lena.png images/lena.q100.jpg\nimages/lena.png PNG 512x512 512x512+0+0 8-bit DirectClass 475KB 0.010u 0:00.010\nimages/lena.png=\u003eimages/lena.q100.jpg PNG 512x512 512x512+0+0 8-bit DirectClass 401KB 0.030u 0:00.039\n\n$ ./adept-jpeg.sh images/lena.q100.jpg\n./adept-jpeg.sh options: inherit, 69, autodetect, _adept_compress_imagemagick\n404266 images/lena.q100.jpg\nsize=8 512 512\ntilecount=64x64\nsalient=1.04084\nsalient=74.321\nsalient=48.2852\nsalient=36.5063\nthreshold=43\nslice to ram... ok.\nestimate content complexity and compress... 4096 tile ok.\nfinal image... ok.\n200860 images/lena.q100_adept_compress_imagemagick.jpg (50%)\n\n$ dssim -o images/lena.q100_adept_compress_imagemagick.c.png images/lena.png images/lena.q100_adept_compress_imagemagick.jpg\n0.00236562  lena.q100_adept_compress_imagemagick.jpg\n```\n![PNG](./images/lena.png) ![JPEG Q=100](./images/lena.q100.jpg) ![ADEPT JPEG](./images/lena.q100_adept_compress_imagemagick.jpg) ![DSSIM](./images/lena.q100_adept_compress_imagemagick.c.png)\n\nPNG -\u003e JPEG Q=100 -\u003e ADEPT JPEG -\u003e Compare (DSSIM)\n\n## Contributors\n\nIn alphabetical order:\n\n * [Andy Davies](http://twitter.com/andydavies)\n * [Gregor Fabritius](http://twitter.com/grefab)\n * [Neil Jedrzejewski](http://www.wunderboy.org/about.php)\n * [Alessandro Lenzen](http://twitter.com/adelnorsz)\n * [Claus Meteling](http://www.xing.com/profile/Claus_Meteling)\n * [André Roaldseth](http://twitter.com/androa)\n * [Christian Schäfer](http://twitter.com/derSchepp)\n * [Yoav Weiss](http://twitter.com/yoavweiss)\n\n## Licence\n\nThis software is published under the BSD licence 3.0\n\nCopyright (c) 2015, Tobias Baldauf\nAll rights reserved.\n\nMail: [kontakt@tobias-baldauf.de](mailto:kontakt@tobias-baldauf.de)\nWeb: [who.tobias.is](http://who.tobias.is/)\nTwitter: [@tbaldauf](http://twitter.com/tbaldauf)\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnopagan%2Fadept-jpg-compressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnopagan%2Fadept-jpg-compressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnopagan%2Fadept-jpg-compressor/lists"}