{"id":23675080,"url":"https://github.com/urigrif/jpeg-encoder","last_synced_at":"2025-12-25T01:30:12.792Z","repository":{"id":228891361,"uuid":"774608894","full_name":"uriGrif/jpeg-encoder","owner":"uriGrif","description":"Rust command line tool that compresses images following the JPEG standard. Currently supports BMP to JPEG conversion.","archived":false,"fork":false,"pushed_at":"2024-12-13T14:00:15.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T13:57:29.153Z","etag":null,"topics":["bmp","compression","huffman-coding","jpeg","jpeg-encoder","quantization","rust","subsampling"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uriGrif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-19T21:12:03.000Z","updated_at":"2024-12-13T14:00:19.000Z","dependencies_parsed_at":"2024-07-22T03:42:45.529Z","dependency_job_id":"56c2294c-0e33-4c7c-b2c7-e4287d9e825b","html_url":"https://github.com/uriGrif/jpeg-encoder","commit_stats":null,"previous_names":["urigrif/jpeg-encoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriGrif%2Fjpeg-encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriGrif%2Fjpeg-encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriGrif%2Fjpeg-encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uriGrif%2Fjpeg-encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uriGrif","download_url":"https://codeload.github.com/uriGrif/jpeg-encoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239708991,"owners_count":19684165,"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":["bmp","compression","huffman-coding","jpeg","jpeg-encoder","quantization","rust","subsampling"],"created_at":"2024-12-29T13:56:36.625Z","updated_at":"2025-12-25T01:30:12.754Z","avatar_url":"https://github.com/uriGrif.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JPEG Encoder\r\n\r\n![](https://www.eetimes.com/wp-content/uploads/media-1101219-fig1.jpg)\r\n\r\n## About the project\r\n\r\nThis is a simple command line tool that converts BMP image files to JPEG image files.\r\n\r\nI made this project because I once learned how the JPEG algorithm worked and thought it was really cool and clever all the things it did to drastically reduce the size of an image, while keeping a good quality.\r\n\r\nMoreover, it ended up being a great project to learn to code in the Rust programming language, and learning a whole lot of other interesting stuff, such as Huffman Coding, file headers and much more.\r\n\r\n![](https://img.shields.io/badge/rust-orange.svg?style=flat\u0026logo=rust)\r\n\r\n## Theory behind the code\r\n\r\nIf you want to learn how the code and the whole compression process works, you can check out [this document](jpeg_theory.md). It contains everything I learned in this project, with all the best sources I used.\r\n\r\n## Getting started\r\n\r\n1.  Make sure you have the Rust compiler (You can get it [here](https://www.rust-lang.org))\r\n\r\n2.  Clone this repository:\r\n\r\n```console\r\ngit clone https://github.com/uriGrif/jpeg-encoder.git\r\n```\r\n\r\n3. Go inside the project folder and try it out\r\n\r\n```console\r\ncd jpeg-encoder\r\ncargo run -- --image \u003cBMP_INPUT_FILE\u003e [OPTIONS]\r\n```\r\n\r\n```\r\nOPTIONS:\r\n  -i, --image \u003cIMAGE\u003e\r\n          the input image path\r\n  -o, --output \u003cOUTPUT\u003e\r\n          the output image path (optional) [default: ]\r\n  -s, --subsampling-ratio \u003cSUBSAMPLING_RATIO\u003e\r\n          Subsampling ratio in the format `4:2:0`, `4:4:4`, or `4:2:2` [default: 4:2:0]\r\n  -d, --dct-algorithm \u003cDCT_ALGORITHM\u003e\r\n          DCT algorithm to use: either \"RealDct\" or \"BinDct\" [default: real-dct] [possible values: real-dct, bin-dct]\r\n  -h, --help\r\n          Print help\r\n  -V, --version\r\n          Print version\r\n```\r\n\r\n4. You can also build the binary and use it anywhere\r\n\r\n```console\r\ncargo build --release\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furigrif%2Fjpeg-encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furigrif%2Fjpeg-encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furigrif%2Fjpeg-encoder/lists"}