{"id":29016436,"url":"https://github.com/kelwynoliveira/image_converter","last_synced_at":"2026-05-09T06:03:11.565Z","repository":{"id":300817157,"uuid":"1006649613","full_name":"kelwynOliveira/image_converter","owner":"kelwynOliveira","description":"Fast, lightweight, and self-hosted image converter API. Upload an image and convert it to multiple formats with FastAPI and Pillow. Powered by Docker.","archived":false,"fork":false,"pushed_at":"2025-06-23T18:23:26.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T19:32:30.804Z","etag":null,"topics":["api","backend","docker","fastapi","image-converter","image-processing","microservice","pillow","python","self-hosted"],"latest_commit_sha":null,"homepage":"","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/kelwynOliveira.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}},"created_at":"2025-06-22T18:08:42.000Z","updated_at":"2025-06-23T18:23:30.000Z","dependencies_parsed_at":"2025-06-23T19:34:23.187Z","dependency_job_id":"08e1ef0c-b999-4e7e-a98e-bfda3dacaa81","html_url":"https://github.com/kelwynOliveira/image_converter","commit_stats":null,"previous_names":["kelwynoliveira/image_converter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kelwynOliveira/image_converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelwynOliveira%2Fimage_converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelwynOliveira%2Fimage_converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelwynOliveira%2Fimage_converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelwynOliveira%2Fimage_converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelwynOliveira","download_url":"https://codeload.github.com/kelwynOliveira/image_converter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelwynOliveira%2Fimage_converter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261960448,"owners_count":23236575,"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":["api","backend","docker","fastapi","image-converter","image-processing","microservice","pillow","python","self-hosted"],"created_at":"2025-06-25T22:08:27.714Z","updated_at":"2026-05-09T06:03:11.529Z","avatar_url":"https://github.com/kelwynOliveira.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Docker](https://img.shields.io/badge/docker-ready-blue?logo=docker) ![FastAPI](https://img.shields.io/badge/fastapi-async%20api-green?logo=fastapi)\n\n# 🖼️ Image Converter API\n\n\u003e Fast, lightweight, self-hosted API for image conversion. Built with **FastAPI** and **Pillow**, containerized with Docker.\n\n---\n\n## 🚀 Features\n\n- ✅ Upload an image and convert it to another format.\n- ✅ Supports **10+ formats** (JPEG, PNG, WebP, TIFF, BMP, PSD, EPS, ICO, GIF, DDS, etc.).\n- ✅ Returns the converted image directly as a download (streamed).\n- ✅ Clean API with proper error handling and HTTP status codes.\n- ✅ Fully containerized with Docker.\n- ✅ CORS enabled (configurable).\n- ✅ Healthcheck endpoint for monitoring.\n\n---\n\n## 🔥 Supported Formats\n\n| Extension | MIME Type                 | Pillow Format |\n| --------- | ------------------------- | ------------- |\n| jpg/jpeg  | image/jpeg                | JPEG          |\n| png       | image/png                 | PNG           |\n| webp      | image/webp                | WEBP          |\n| gif       | image/gif                 | GIF           |\n| bmp       | image/bmp                 | BMP           |\n| tiff      | image/tiff                | TIFF          |\n| ico       | image/vnd.microsoft.icon  | ICO           |\n| psd       | image/vnd.adobe.photoshop | PSD           |\n| eps       | application/postscript    | EPS           |\n| jp2/jpc   | image/jp2                 | JPEG2000      |\n| dds       | image/vnd.ms-dds          | DDS           |\n| ppm       | image/x-portable-pixmap   | PPM           |\n| pgm       | image/x-portable-graymap  | PGM           |\n| pbm       | image/x-portable-bitmap   | PBM           |\n| pcx       | image/x-pcx               | PCX           |\n| tga       | image/x-tga               | TGA           |\n| xbm       | image/x-xbitmap           | XBM           |\n| xpm       | image/x-xpixmap           | XPM           |\n\n---\n\n## 🐳 Running with Docker\n\n### ✅ Build the image:\n\n```bash\ndocker build -t image-converter .\n```\n\n### ✅ Run the container:\n\n```bash\ndocker run -d \\\n  -p 3000:3000 \\\n  --name image_converter \\\n  image-converter\n```\n\n### 🌐 Access:\n\n```http\nhttp://localhost:3000\n```\n\n---\n\n## 🛠️ API Usage\n\n### 🔗 Endpoint\n\n```\nPOST /convert_image/?output_format={format}\n```\n\n### 🧠 Query Parameters\n\n| Name          | Type   | Description                |\n| ------------- | ------ | -------------------------- |\n| output_format | string | Output format (e.g. `png`) |\n\n### 📤 Form Data\n\n| Name | Type       | Description   |\n| ---- | ---------- | ------------- |\n| file | UploadFile | Image to send |\n\n### ✅ Example with `curl`\n\n```bash\ncurl -X POST \"http://localhost:3000/convert_image/?output_format=png\" \\\n  -H \"accept: application/json\" \\\n  -H \"Content-Type: multipart/form-data\" \\\n  -F \"file=@test.jpg\" \\\n  --output converted.png\n```\n\n### 🔥 Response\n\n- Returns the image converted to the selected format, directly as a downloadable file.\n\n---\n\n## 🔍 Healthcheck\n\n```http\nGET /health\n```\n\n**Response:**\n\n```json\n{ \"status\": \"ok\" }\n```\n\n---\n\n## 🧰 Development\n\n### ✅ Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n### ✅ Run locally:\n\n```bash\nuvicorn main:app --host 0.0.0.0 --port 3000 --reload\n```\n\n---\n\n## 🗂️ Project Structure\n\n```\n.\n├── main.py              # FastAPI app\n├── convert_image.py      # Image processing functions\n├── requirements.txt      # Python dependencies\n├── Dockerfile            # Docker image\n├── docker-compose.yml    # (optional) Docker compose\n└── README.md             # Documentation\n```\n\n---\n\n## 🔒 Security Notes\n\n- 🚫 Database or storage is not used. Files are handled **in-memory only**, no persistent storage.\n- ✅ No images are saved on the server.\n- ✅ Suitable for local, LAN, or private use. For public exposure, add authentication (e.g. API keys, OAuth).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelwynoliveira%2Fimage_converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelwynoliveira%2Fimage_converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelwynoliveira%2Fimage_converter/lists"}