{"id":48932651,"url":"https://github.com/deepakguptabca/InstantPhotos","last_synced_at":"2026-05-03T12:01:05.708Z","repository":{"id":326544123,"uuid":"1105977369","full_name":"deepakguptabca/InstantPhotos","owner":"deepakguptabca","description":"Get Ready Passport size photo in seconds ","archived":false,"fork":false,"pushed_at":"2026-04-19T07:25:29.000Z","size":15909,"stargazers_count":129,"open_issues_count":1,"forks_count":66,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-19T09:21:30.277Z","etag":null,"topics":["passport-size-photo-maker","projects"],"latest_commit_sha":null,"homepage":"https://instantphotos-jk60.onrender.com/","language":"Python","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/deepakguptabca.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-28T12:41:27.000Z","updated_at":"2026-04-19T07:31:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"7549ed7a-9af0-44e7-b321-968afc09a829","html_url":"https://github.com/deepakguptabca/InstantPhotos","commit_stats":null,"previous_names":["deepakguptabca/passport_size_photo_maker","deepakguptabca/instantphotos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepakguptabca/InstantPhotos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakguptabca%2FInstantPhotos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakguptabca%2FInstantPhotos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakguptabca%2FInstantPhotos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakguptabca%2FInstantPhotos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepakguptabca","download_url":"https://codeload.github.com/deepakguptabca/InstantPhotos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakguptabca%2FInstantPhotos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32568036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["passport-size-photo-maker","projects"],"created_at":"2026-04-17T10:00:39.620Z","updated_at":"2026-05-03T12:01:05.702Z","avatar_url":"https://github.com/deepakguptabca.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# 📸 Passport Photo Pro\n\nA web-based tool to generate print-ready passport photo sheets from uploaded images. Supports multiple photos, per-photo copy counts, AI background removal, image enhancement, and multi-page PDF export — all on an A4 layout at 300 DPI.\n---\n### Silent Contributor \n  Base code - [Abacusus](https://github.com/abacusus)\n  \n---\n\n## 🚀 Features\n\n- **Multi-photo upload** — drag \u0026 drop or click to upload one or more photos at once\n- **Per-photo copy count** — set how many copies of each photo you need (1–54)\n- **In-browser cropper** — crop each photo to the correct passport aspect ratio before processing\n- **AI background removal** — powered by [remove.bg](https://www.remove.bg/)\n- **AI image enhancement** — restored and sharpened via [Cloudinary's gen_restore](https://cloudinary.com/documentation/image_transformations)\n- **A4 print layout** — photos are automatically arranged in a grid at 300 DPI\n- **Multi-page PDF** — if photos exceed one A4 page, additional pages are created automatically\n- **Advanced options** — customize photo width, height, spacing, and border size\n- **Feedback system** — built-in bug report form powered by EmailJS\n- **Animated particle background** — via Particles.js\n\n---\n\n## 🧰 Tech Stack\n\n| Layer     | Technology                        |\n|-----------|-----------------------------------|\n| Frontend  | HTML, Tailwind CSS, Vanilla JS    |\n| Cropping  | Cropper.js                        |\n| Backend   | Python, Flask                     |\n| Image AI  | remove.bg API, Cloudinary AI      |\n| PDF gen   | Pillow (PIL)                      |\n| Email     | EmailJS                           |\n\n---\n\n## 📦 Prerequisites\n\n- Python 3.8+\n- pip\n- A [remove.bg](https://www.remove.bg/api) API key\n- A [Cloudinary](https://cloudinary.com/) account (free tier works)\n\n---\n\n## 🛠️ Installation\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/your-username/passport-photo-pro.git\ncd passport-photo-pro\n```\n\n### 2. Create a virtual environment (recommended)\n\n```bash\npython -m venv venv\n\n# On macOS/Linux\nsource venv/bin/activate\n\n# On Windows\nvenv\\Scripts\\activate\n```\n\n### 3. Install dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 4. Set up environment variables\n\nCreate a `.env` file in the project root:\n\n```env\nREMOVE_BG_API_KEY=your_remove_bg_api_key_here\nCLOUDINARY_CLOUD_NAME=your_cloud_name\nCLOUDINARY_API_KEY=your_cloudinary_api_key\nCLOUDINARY_API_SECRET=your_cloudinary_api_secret\n```\n\n\u003e ⚠️ Never commit your `.env` file. Add it to `.gitignore`.\n\n### 5. Run the app\n\n```bash\npython app.py\n```\n\nThe server will start at `http://localhost:5000`.\n\n---\n\n## 📁 Project Structure\n\n```\npassport-photo-pro/\n├── app.py                  # Flask backend — image processing \u0026 PDF generation\n├── requirements.txt        # Python dependencies\n├── .env                    # Environment variables (not committed)\n├── templates/\n│   └── index.html          # Frontend UI\n└── README.md\n```\n\n---\n\n## 📋 requirements.txt\n\nMake sure your `requirements.txt` includes:\n\n```\nflask\npillow\nrequests\npython-dotenv\ncloudinary\n```\n\nGenerate it automatically with:\n\n```bash\npip freeze \u003e requirements.txt\n```\n\n---\n\n## 🖼️ How It Works\n\n### Upload\n- Open the app in your browser at `http://localhost:5000`\n- Drag and drop one or more photos onto the upload zone, or click to browse\n- Each photo appears as a card with a thumbnail\n\n### Crop (Optional but Recommended)\n- Click **Crop** on any photo card\n- A modal cropper opens with a fixed passport aspect ratio (384×472)\n- Adjust the crop area and click **Crop \u0026 Save**\n\n### Set Copies\n- Each photo card has a **Copies** input (default: 6)\n- Change it per photo to control how many times it appears on the sheet\n\n### Advanced Options (Optional)\n- Click **Advanced Options** to customize:\n  - **Width / Height** — passport photo dimensions in pixels\n  - **Spacing** — gap between rows of photos\n  - **Border** — black border thickness around each photo\n\n### Generate\n- Click **Generate Sheet**\n- The backend processes each photo:\n  1. Removes the background via remove.bg\n  2. Uploads to Cloudinary and applies AI restoration\n  3. Resizes and adds a border\n- All photos are arranged on A4 pages (2480×3508 px at 300 DPI)\n- If photos overflow one page, new pages are added automatically\n\n### Download\n- Once generated, a PDF preview appears in the browser\n- Click **Download PDF** to save the print-ready file\n\n---\n\n## ⚙️ API Endpoints\n\n| Method | Route      | Description                          |\n|--------|------------|--------------------------------------|\n| GET    | `/`        | Serves the frontend UI               |\n| POST   | `/process` | Accepts images, returns a PDF stream |\n\n### `/process` Form Data\n\n| Field       | Type    | Description                              |\n|-------------|---------|------------------------------------------|\n| `image_0`   | File    | First uploaded image                     |\n| `copies_0`  | Integer | Number of copies for image 0             |\n| `image_1`   | File    | Second uploaded image (if any)           |\n| `copies_1`  | Integer | Number of copies for image 1             |\n| `width`     | Integer | Passport photo width in px (default 400) |\n| `height`    | Integer | Passport photo height in px (default 400)|\n| `spacing`   | Integer | Row spacing in px (default 25)           |\n| `border`    | Integer | Border size in px (default 2)            |\n\n---\n\n## 🔐 Environment Variables Reference\n\n| Variable                | Description                          |\n|-------------------------|--------------------------------------|\n| `REMOVE_BG_API_KEY`     | API key from remove.bg               |\n| `CLOUDINARY_CLOUD_NAME` | Your Cloudinary cloud name           |\n| `CLOUDINARY_API_KEY`    | Cloudinary API key                   |\n| `CLOUDINARY_API_SECRET` | Cloudinary API secret                |\n\n---\n\n## 🐛 Known Limitations\n\n- remove.bg has a daily free-tier quota — heavy usage may return a `429` error\n- Very large images may slow down processing\n- The Cloudinary `gen_restore` transformation may not be available on all plans\n\n---\n\n## 📬 Feedback \u0026 Bug Reports\n\nUse the red chat button in the bottom-right corner of the app to submit feedback or report bugs directly from the UI.\n\n---\n\n## 📄 License\n\nMIT License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakguptabca%2FInstantPhotos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepakguptabca%2FInstantPhotos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakguptabca%2FInstantPhotos/lists"}