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: 8 months 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 (12 months ago)
- Default Branch: main
- Last Pushed: 2024-12-30T04:03:02.000Z (10 months ago)
- Last Synced: 2024-12-30T04:28:07.963Z (10 months 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
[](https://codecov.io/gh/fuongz/image-proxy)  
## 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"]
```## Development
1. Clone this repository
```sh
git clone git@github.com: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)