{"id":28579189,"url":"https://github.com/khaledalam/softcropper","last_synced_at":"2025-06-11T01:39:18.623Z","repository":{"id":292067818,"uuid":"979739609","full_name":"khaledalam/softcropper","owner":"khaledalam","description":"Automatically resize and blur-pad rectangular images into perfect squares. Ideal for photo preparation and print workflows.","archived":false,"fork":false,"pushed_at":"2025-06-01T04:04:22.000Z","size":725,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T13:03:21.607Z","etag":null,"topics":["image-processing","pypl","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/softcropper/","language":"Python","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/khaledalam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-08T02:00:17.000Z","updated_at":"2025-06-01T04:02:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"49a3596c-3240-455a-9b9e-03c6bd49914b","html_url":"https://github.com/khaledalam/softcropper","commit_stats":null,"previous_names":["khaledalam/softcropper"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fsoftcropper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fsoftcropper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fsoftcropper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fsoftcropper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khaledalam","download_url":"https://codeload.github.com/khaledalam/softcropper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khaledalam%2Fsoftcropper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259182645,"owners_count":22818133,"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-processing","pypl","python"],"created_at":"2025-06-11T01:38:33.626Z","updated_at":"2025-06-11T01:39:18.612Z","avatar_url":"https://github.com/khaledalam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# SoftCropper\n\n[![PyPI version](https://badge.fury.io/py/softcropper.svg)](https://pypi.org/project/softcropper/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/khaledalam/softcropper/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/khaledalam/softcropper/actions/workflows/test.yml)\n[![Python](https://img.shields.io/badge/python-≥3.7-blue.svg)](https://www.python.org/)\n\n**SoftCropper** is a Python tool that automatically resizes rectangular images into squares and adds soft, blurred borders — ideal for prepping images for print or display.\n\n\u003e _This package is part of the internal tools used at [CanvasMagnet](https://www.instagram.com/canvamagnet/) for order preparation and production automation._\n\n---\n\n\u003cimg src=\"https://raw.githubusercontent.com/khaledalam/softcropper/main/tests/softcropper.png\" /\u003e\n\n---\n\n### 📸 Example Results\n\n| Before | ➡️ | After |\n|--------|----|-------|\n| \u003csub\u003eBaby.webp (600×900)\u003c/sub\u003e\u003cbr\u003e\u003cimg src=\"https://raw.githubusercontent.com/khaledalam/softcropper/main/tests/assets/baby.webp\" width=\"150\"/\u003e |  | \u003csub\u003eOutput (900×900)\u003c/sub\u003e\u003cbr\u003e\u003cimg src=\"https://raw.githubusercontent.com/khaledalam/softcropper/main/tests/assets/output/baby.webp\" width=\"150\"/\u003e |\n| \u003csub\u003eKid.jpg (1100×733)\u003c/sub\u003e\u003cbr\u003e\u003cimg src=\"https://raw.githubusercontent.com/khaledalam/softcropper/main/tests/assets/kid.jpg\" width=\"150\"/\u003e |  | \u003csub\u003eOutput (1100×1100)\u003c/sub\u003e\u003cbr\u003e\u003cimg src=\"https://raw.githubusercontent.com/khaledalam/softcropper/main/tests/assets/output/kid.jpg\" width=\"150\"/\u003e |\n\n---\n\n## 🚀 Features\n\n- Pads any image to a perfect square\n- Fills padding using soft Gaussian blur from original image\n- Automatically saves output in a separate folder\n\n---\n\n## 📦 Requirements\n\n- Python `\u003e= 3.7`\n- `opencv-python`\n- `numpy`\n  \n\n## 🔧 Installation\n\n```bash\npip install softcropper\n```\n\n## ⚙️ Usage\n\n```bash\nsoftcropper ./path/input_photos ./path/output_ready --mode blur\n```\n- input_photos: folder with png, jpg, jpeg, or webp files\n- output_photos: optional (defaults to ./input_photos/output/)\n- modes: blur, solid, gradient\n\n## ✅ Testing\n\n```bash\nPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest tests/test_softcropper.py -v\n```\n\n## 📄 Changelog\n✨ [CHANGELOG.md](./CHANGELOG.md)\n\n\n## 🛠️ Makefile Commands\n\n```\nmake venv         # create .venv\nmake install      # install in editable mode\nmake test         # run unit/integration tests\nmake build        # build for PyPI\nmake clean        # remove all build artifacts and caches\n```\n\n## 🤝 Contribution\nPull requests are welcome! If you'd like to suggest improvements or fix issues, feel free to fork and submit.\n\n\n## Author\n\n**Khaled Alam**\n\n📧 [khaledalam.net@gmail.com](mailto:khaledalam.net@gmail.com)\u003cbr /\u003e\n🌍 [Website](https://khaledalam.net/) | [LinkedIn](https://www.linkedin.com/in/khaledalam/) | [X(Twitter)](https://x.com/khaledalamxyz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledalam%2Fsoftcropper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhaledalam%2Fsoftcropper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhaledalam%2Fsoftcropper/lists"}