Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tj/letterbox

Go program to batch-process letter-boxing of photographs.
https://github.com/tj/letterbox

golang image-processing instagram photography

Last synced: 11 days ago
JSON representation

Go program to batch-process letter-boxing of photographs.

Awesome Lists containing this project

README

        

# Letterbox

A tiny Go program to batch-process letter-boxing of photographs.

## Installation

From [gobinaries.com](https://gobinaries.com):

```sh
$ curl -sf https://gobinaries.com/tj/letterbox/cmd/letterbox | sh
```

From source:

```
$ go get github.com/tj/letterbox/cmd/letterbox
```

## Usage

```
Usage of letterbox:
-aspect string
Output aspect ratio (default "16:9")
-concurrency int
Concurrency of image processing (default 8)
-force
Force image reprocess when it exists
-output string
Image output directory (default "processed")
-padding int
Output image padding in percentage
-quality int
Output jpeg quality (default 90)
-white
Output a white letterbox
```

## Examples

Example of 1:1

```
$ letterbox -aspect 1:1
```

![](https://apex-software.imgix.net/github/tj/letterbox/1-1.jpg?w=500&dpr=2)

Example of 4:3

```
$ letterbox -aspect 4:3
```

![](https://apex-software.imgix.net/github/tj/letterbox/4-3.jpg?w=500&dpr=2)

Example of 16:9 (the default)

```
$ letterbox -aspect 16:9
```

![](https://apex-software.imgix.net/github/tj/letterbox/16-9.jpg?w=500&dpr=2)

Example of explicitly listing images:

```
$ letterbox DSCF6719.jpg DSCF6718.jpg
```

![](https://apex-software.imgix.net/github/tj/letterbox/16-9.jpg?w=500&dpr=2)

Example of 1:1 with a white background and 6% padding:

```
$ letterbox -white -aspect 1:1 -padding 6
```

![](https://apex-software.imgix.net/github/tj/letterbox/1-1-white.jpg?w=500&dpr=2)

---

[![GoDoc](https://godoc.org/github.com/tj/letterbox?status.svg)](https://godoc.org/github.com/tj/letterbox)
![](https://img.shields.io/badge/license-MIT-blue.svg)
![](https://img.shields.io/badge/status-stable-green.svg)

## Sponsors

This project is sponsored by my [GitHub sponsors](https://github.com/sponsors/tj):

[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/0)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/1)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/2)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/3)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/4)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/5)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/6)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/7)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/8)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/9)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/10)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/11)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/12)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/13)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/14)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/15)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/16)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/17)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/18)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/19)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/20)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/21)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/22)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/23)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/24)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/25)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/26)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/27)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/28)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/29)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/30)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/31)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/32)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/33)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/34)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/35)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/36)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/37)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/38)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/39)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/40)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/41)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/42)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/43)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/44)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/45)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/46)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/47)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/48)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/49)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/50)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/51)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/52)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/53)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/54)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/55)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/56)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/57)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/58)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/59)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/60)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/61)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/62)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/63)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/64)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/65)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/66)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/67)
[](https://sponsors-api-u2fftug6kq-uc.a.run.app/sponsor/profile/68)