posterust

Crates.ioposterust
lib.rsposterust
version0.0.1
sourcesrc
created_at2020-03-10 20:31:57.247117
updated_at2020-03-10 20:31:57.247117
descriptionCommand-line utility to make value-limited, posterized images from existing pictures. Based on a brightness scale with values from 0 to 10, users can specify which values to display. Developed as a tool to help with value studies for painting and explore tonal shapes.
homepagehttps://github.com/okaneco/posterust
repositoryhttps://github.com/okaneco/posterust
max_upload_size
id217368
size39,475
Collyn O'Kane (okaneco)

documentation

README

posterust

Build Status Crates.io

Reduce images to simple values, pick the values you want to show. Designed to help with value studies, exploring tonal shapes, experimenting with compositions, making fun image edits, or being the ground work for your next creation.

posterust was created to explore paramerized posterization for a finer, more "artistic" control. Not limited to equal divisions of value, users can include any of the values they want from 0 (black) to 10 (white). Custom colors can be included to give life to the greyscale.

Features

  • 2 to 11 step greyscale posterization
  • custom, multiple posterization thresholds
  • custom colors for posterization levels
  • save as .jpg or .png
  • batch process images

Examples

1) posterust FILE -v 2,9 -k

Black and grey pagoda

The value groupings look like this with the -k flag present. The value thresholds are separated into 255/[number of values]-sized buckets.

[0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127]

Without -k, the groupings are

[46, 46, 46, 46, 46, 46, 46, 46, 46, 207, 207]

which results in the following image where brightness values below Luma(207) turn into a grey with rgb(46,46,46) and above turn into a grey with rgb(207,207,207) which gives a nice silhouette or notan. Both modes have their advantages and affect how the images are rendered.

Black and grey pagoda

2) posterust FILE -v 2,7,9 -c 535161,d5677f,fcba03 -k

Red pagoda over yellow sky

The value flag works by mapping the 11 values to the ranges declared by the user. In this example, values 0-6 will be mapped to 2, 7-8 to 7, and 9-10 to 9.

3) posterust FILE -n 5 -c 693787,c14281,fa6a67,ffaa4d,faf059

Woman posing with hand on her head

Using -n splits the buckets for each value range to be 255/n per bucket. In this example, each bucket contains 51 luma values before the next threshold.

4) posterust FILE -v 0,3,5,7,9 -k

Woman posing with hand on side of her neck

Black and white example with values split up as follows.

[0, 0, 0, 51, 51, 102, 102, 153, 153, 204, 204]

The colors in the examples were generated using the tool palgrad.

Photo attribution:

Pagoda - lifeofwu/johnmwu
Model - daria/dariashevtsova
Images that examples were created from are located in /gfx/.

License

This crate is licensed under either

at your option.

Commit count: 4

cargo fmt