Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fuongz/image-proxy
🏞️ Image Proxy. Convert HEIC to PNG with Pillow and FastAPI
https://github.com/fuongz/image-proxy
fastapi heic-to-jpeg heic-to-png pillow pillow-heif
Last synced: 17 days ago
JSON representation
🏞️ Image Proxy. Convert HEIC to PNG with Pillow and FastAPI
- Host: GitHub
- URL: https://github.com/fuongz/image-proxy
- Owner: fuongz
- License: mit
- Created: 2024-10-30T07:00:21.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-06T16:26:20.000Z (30 days ago)
- Last Synced: 2024-12-06T17:31:02.904Z (30 days ago)
- Topics: fastapi, heic-to-jpeg, heic-to-png, pillow, pillow-heif
- Language: Python
- Homepage: https://image.phake.app
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Proxy - HEIC to PNG converter
![Uptime](https://uptime.betterstack.com/status-badges/v3/monitor/1oiyb.svg) ![Run Unit Test via PyTest](https://github.com/fuongz/image-proxy/actions/workflows/run_test.yml/badge.svg)
## Table of Contents
- [Tech Stack](#tech-stack)
- [Feature](#feature)
- [Environment variables](#environment-variables)
- [Demo](#demo)
- [Development](#development)
- [License](#license)## Tech stack:
- FastAPI
- Pillow## Features
- [x] Convert image to any file extensions
- [x] Resize image
- [x] Support Bypass CORS
- [ ] Support `.GIF` file## Environment variables
```
SUPPORTED_SCHEMES = ["http", "https"]
MAX_FILE_SIZE = 12400000
TIMEOUT = 15
SUPPORTED_FILE_TYPES = [
"image/png",
"image/jpeg",
"image/heif",
"image/heic",
"image/webp",
]
SUPPORTED_OUTPUT_IMAGE_TYPES = ["JPG", "JPEG", "PNG", "WEBP"]
```## Demo
```
https://img.phake.app/format(webp):quality(70):size(200,200)/https://images.pexels.com/photos/27200179/pexels-photo-27200179/free-photo-of-landscape-of-hill-behind-flowers.jpeg
```## Development
1. Clone this repository
```sh
git clone [email protected]:fuongz/image-proxy.git
```2. Install the required dependencies
```sh
# with venv
# python -m venv venvpip install -r requirements.txt
```3. Run with fastapi and expose to port 3000
```sh
fastapi dev app/main.py --port 3000
```# License
- [MIT](./LICENSE)