{"id":26699036,"url":"https://github.com/darmiel/more-jpeg","last_synced_at":"2025-04-13T05:50:21.831Z","repository":{"id":204783253,"uuid":"712652233","full_name":"darmiel/more-jpeg","owner":"darmiel","description":"Instantly adds nice compression artifacts to your JPEG images","archived":false,"fork":false,"pushed_at":"2024-12-13T23:15:59.000Z","size":893,"stargazers_count":11,"open_issues_count":8,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T22:32:01.668Z","etag":null,"topics":["image-enhancer","image-optimization","jpeg-image-compression"],"latest_commit_sha":null,"homepage":"https://jpeg.qwer.tz","language":"TypeScript","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/darmiel.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":"2023-10-31T22:49:49.000Z","updated_at":"2024-12-28T20:57:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"76d06337-350a-48f6-8032-10cb70a90ff7","html_url":"https://github.com/darmiel/more-jpeg","commit_stats":null,"previous_names":["darmiel/more-jpeg"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fmore-jpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fmore-jpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fmore-jpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darmiel%2Fmore-jpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darmiel","download_url":"https://codeload.github.com/darmiel/more-jpeg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670501,"owners_count":21142901,"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":["image-enhancer","image-optimization","jpeg-image-compression"],"created_at":"2025-03-26T22:27:01.458Z","updated_at":"2025-04-13T05:50:21.807Z","avatar_url":"https://github.com/darmiel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# more-jpeg\n\nmore-jpeg is a service designed to intentionally degrade the quality of JPEG images by introducing significant compression artifacts, turning them into ✨ works of _art_ ✨.\n\n## Examples\n\n|Original|10|5|0|\n|--------|---|---|---|\n|![hair](https://github.com/darmiel/more-jpeg/assets/71837281/04a92ba9-cb79-407c-a666-43c8720f2fc3)|![hair-low-10](https://github.com/darmiel/more-jpeg/assets/71837281/520659a6-a8b4-43bb-b4ad-36669448d671)|![hair-low-5](https://github.com/darmiel/more-jpeg/assets/71837281/ab3a41a0-55eb-40b6-904b-a421fe2c0ba8)|![hair-low-0](https://github.com/darmiel/more-jpeg/assets/71837281/67c71197-8a0a-4530-9abf-86886cea2a13)|\n\nAs you can see, JPEGs with quality `10`, `5` or even `0` look _way_ better than the original.\n\n## Demo\n\nTry it out here: https://jpeg.qwer.tz/ _(no uptime gurantee)_\n\n# Contributing\n\n## Creating new Recipes\n\n\u003e [!NOTE]\n\u003e Recipes determine the final export quality of the JPEGs.\n\u003e They also contain a list of \"ingredients\" that are applied **before** the export\n\u003e (such as inverting an image).\n\u003e\n\u003e If you want to contribute such new ingredients, please refer to the section [Creating new Ingredients](#creating-new-ingredients).\n\nIt is easy to add new recipes, simply append your recipe to the `recipes` object in [`frontend/src/util/recipe.tsx`](frontend/src/util/recipe.tsx).\nYou may use the **Export** button in the frontend to generate recipes.\n\nYou will need to specify the following attributes:\n\n- `name` (string) - A name for your recipe\n- `description` (string) - A description for your recipe\n- `destroy_factor` (uint) - A rating from `0` (_no destruction_) to `100` (_much destruction_) how much the image is destroyed\n- `quality` (uint) - The JPEG export quality from `0` (_compression artifcats' dream_) to `100` (_no compression artifacts_)\n- `ingredients` (Ingredient[]) - A list of ingredients for the recipe\n- `preview` (string) - Path to a preview (you should put it in the `frontend/public/examples` directory)\n\n```typescript\n{\n    name: \"Noise\",\n    description: \"Adds a little bit of noise\",\n    destroy_factor: 15,\n    quality: 95,\n    ingredients: [{ \n        id: \"exponential_noise\", \n        with: { scale: 30 }\n    }],\n    preview: \"/examples/noise.jpeg\",\n},\n```\n\n---\n\n## Creating new Ingredients\n\nTo create a new ingredient (image operation), follow these steps:\n\n### Backend\n\nFirst, in [`recipe_actions.py`](recipe_actions.py) create a function with the name `action_\u003cingredient-identifier\u003e` using this signature `(img: Image, options: dict) -\u003e Image`\n\n```python\ndef action_invert(img: Image, _: dict) -\u003e Image:\n    return ImageOps.invert(img)\n```\n\nThen add your ingredient to the `actions` dictionary in [`recipe_actions.py`](recipe_actions.py).\n\n```python\n\"invert\": {\n    \"executor\": action_invert,\n    # optional, if you have any parameters, specify them here by name + accepted types\n    \"options\": {\n        \"scale\": [float, int]\n    }\n},\n```\n\n### Frontend\n\nIn [`frontend/src/util/recipe.tsx`](frontend/src/util/recipe.tsx), include your ingredient within `ingredientMeta`.\nYou will need to specify the following attributes:\n\n- `icon` (ReactNode) - see [react-icons](https://react-icons.github.io/react-icons/icons?name=fa6) for a list of available icons\n- `description` (string)\n\nIf your ingredient accepts any parameters, also add:\n\n- `param_info` (ParamInfo)\n\n```tsx\ninvert: {\n    icon: \u003cFaFill /\u003e,\n    description: \"Reverses colors in the image\",\n    param_info: {\n      scale: {\n        // will be shown if you hover over the (i) in the ingredient options\n        description: \"Amount of xyz to add\",\n        // will be the default value when adding new ingredients\n        default: 30,\n      },\n    },\n},\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarmiel%2Fmore-jpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarmiel%2Fmore-jpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarmiel%2Fmore-jpeg/lists"}