Go to file
Niles Rogoff 2dcf97d16f
Makefile written
2017-02-04 21:20:38 -05:00
test Regenerated test2.png 2017-01-18 09:11:21 -05:00
.gitignore NEW FANCY-ASS PROGRESS BAR 2016-07-11 11:32:38 -04:00
2bit.py Makefile written 2017-02-04 21:20:38 -05:00
Makefile Makefile written 2017-02-04 21:20:38 -05:00
README.md Added "auto" mode for nonrandom dithering, fixed tests 2016-07-21 13:58:33 -07:00


Image downsampling converter

Inspired by 2bit

Usage: python3 2bit.py infile.png [outfile.png] [bits] [--per-color] [--dither dither_value] [--non-random-dither num_pixels]

You can change the number of bits for different results. 1 would be just black and white, while 8 would be the original image in greyscale.

dither_value can be like 50%, 50, .5 or auto

Note that using --non-random-dither without a dither argument will attempt to guess what dither percentage you want based on the number of bits

The best number for num_pixels varies with the image. In general, the height of the image modulo num_pixels + 1 should not equal zero. Experiment with it. Using auto will try to guess a good value such that you don't get horizontal bars, but it's not very good at it.

Warning: Will probably turn transparency black