https://github.com/imamik/polaroid-image-modifier
Apply authentic Polaroid 600 and Instax (Mini, Square, Wide) instant film effects to images. Go library and CLI with realistic color grading, vignette, grain, and chemical distortion.
https://github.com/imamik/polaroid-image-modifier
cli film-effects go golang image-processing instax photo-filter photography polaroid vintage-filters
Last synced: 3 months ago
JSON representation
Apply authentic Polaroid 600 and Instax (Mini, Square, Wide) instant film effects to images. Go library and CLI with realistic color grading, vignette, grain, and chemical distortion.
- Host: GitHub
- URL: https://github.com/imamik/polaroid-image-modifier
- Owner: imamik
- License: mit
- Created: 2026-02-02T13:41:10.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-23T19:33:04.000Z (4 months ago)
- Last Synced: 2026-02-23T21:12:11.899Z (4 months ago)
- Topics: cli, film-effects, go, golang, image-processing, instax, photo-filter, photography, polaroid, vintage-filters
- Language: Go
- Size: 31.9 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Polaroid Image Modifier
[](https://github.com/imamik/polaroid-image-modifier/actions/workflows/ci.yml)
[](https://goreportcard.com/report/github.com/imamik/polaroid-image-modifier)
[](https://codecov.io/gh/imamik/polaroid-image-modifier)
[](https://pkg.go.dev/github.com/imamik/polaroid-image-modifier)
[](https://opensource.org/licenses/MIT)
[](https://github.com/imamik/polaroid-image-modifier/releases)
Apply authentic instant film effects to your images. Supports Polaroid 600 and Instax (Mini, Square, Wide) frame types with realistic color grading, vignette, grain, and chemical distortion effects.
## Features
- **Multiple Frame Types**: Polaroid 600, Instax Mini, Instax Square, Instax Wide
- **Authentic Film Effects**: Color grading, vignette, chromatic aberration, film grain
- **Chemical Distortion**: Realistic edge effects and chemistry overlays
- **Batch Processing**: Process entire directories of images
- **CLI & Library**: Use as a command-line tool or import as a Go package
## Installation
### CLI
```bash
# Using Go
go install github.com/imamik/polaroid-image-modifier/cmd/polaroid@latest
# Or download from releases
# https://github.com/imamik/polaroid-image-modifier/releases
```
### Library
```bash
go get github.com/imamik/polaroid-image-modifier
```
## Usage
### CLI
#### Process a Single Image
```bash
polaroid process -i input.jpg -o output.jpg -f polaroid_600 -t polaroid
```
#### Batch Process
```bash
polaroid batch -i ./input_dir -o ./output_dir -f instax_mini -t instax
```
#### Options
| Flag | Short | Description | Default |
|------|-------|-------------|---------|
| `--input` | `-i` | Input file or directory | (required) |
| `--output` | `-o` | Output file or directory | (required) |
| `--frame` | `-f` | Frame type | `polaroid_600` |
| `--film` | `-t` | Film type effect | `polaroid` |
| `--chemistry` | `-c` | Chemistry overlay directory | (auto-detect) |
| `--dpi` | `-d` | Output DPI reference | `300` |
#### Frame Types
- `polaroid_600` / `polaroid` - Classic Polaroid 600 format
- `instax_mini` / `mini` - Fujifilm Instax Mini
- `instax_square` / `square` - Fujifilm Instax Square
- `instax_wide` / `wide` - Fujifilm Instax Wide
#### Film Types
- `polaroid` - Warm, vintage Polaroid color grading
- `instax` - Cooler, modern Instax color grading
### Library
```go
package main
import (
"log"
polaroid "github.com/imamik/polaroid-image-modifier"
)
func main() {
opts := polaroid.DefaultOptions()
opts.FrameType = polaroid.FramePolaroid600
opts.FilmType = polaroid.FilmPolaroid
err := polaroid.Process("input.jpg", "output.jpg", opts)
if err != nil {
log.Fatal(err)
}
}
```
#### Available Types
```go
// Frame types
polaroid.FramePolaroid600
polaroid.FrameInstaxMini
polaroid.FrameInstaxSq
polaroid.FrameInstaxWide
// Film types
polaroid.FilmPolaroid
polaroid.FilmInstax
```
## Chemistry Overlays
The `chemistry/` directory contains PNG overlays that simulate chemical development artifacts. These are randomly applied and flipped for variety. You can add your own overlays to this directory.
## Development
### Prerequisites
- Go 1.24+
- [pre-commit](https://pre-commit.com/) (optional, for git hooks)
### Setup
```bash
# Clone the repository
git clone https://github.com/imamik/polaroid-image-modifier.git
cd polaroid-image-modifier
# Install dependencies
go mod download
# Install pre-commit hooks (optional)
pre-commit install
pre-commit install --hook-type commit-msg
# Build
go build ./cmd/polaroid
# Run tests
go test ./...
```
### Project Structure
```
.
├── cmd/polaroid/ # CLI application
├── internal/ # Internal packages
│ ├── filters/ # Image filter effects
│ ├── frames/ # Frame specifications
│ └── pipeline/ # Processing pipeline
├── chemistry/ # Chemistry overlay images
├── polaroid.go # Public API
└── go.mod
```
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes using [Conventional Commits](https://www.conventionalcommits.org/)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
MIT License - see [LICENSE](LICENSE) for details.