pixelation

command module
v0.0.0-...-43e8dff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

pixelation

This is a little server that accepts images and pixelates them according to a color palette automatically generated by the median-cut algorithm (thanks go-quantize!). The server produces json, but the same binary can convert images directly or render json produced by the server.

It works on jpeg and png images.

Examples

Server
./bin/pixelate --serve

In another terminal

$ curl -v --compressed -F block-width=8 -F colors=16 -F file=@/path/to/some/picture.jpg 'http://localhost:8080/api/convert' > output.json
$ ./bin/pixelate --render --input=output.json --output=output.jpeg
Standalone
$ ./bin/pixelate --input=file.jpeg --output=pixelated.jpeg

$ ./bin/pixelate --input=file.jpeg --output=pixelated.jpeg --colors=64 --block-width=4

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL