mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
✨ Add experiments directory.
This commit is contained in:
9
experiments/scripts/quantize.sh
Executable file
9
experiments/scripts/quantize.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
EDGE_THRESHOLD=0.1
|
||||
INPUT=`basename $1 .bmp`
|
||||
bmptoppm $1 > tmp/$INPUT.ppm
|
||||
ppmtopgm tmp/$INPUT.ppm > tmp/$INPUT.pgm
|
||||
pgmedge tmp/${INPUT}.pgm > tmp/$INPUT-edge.pgm
|
||||
pgmtopbm -threshold -value ${EDGE_THRESHOLD} tmp/$INPUT-edge.pgm > tmp/${INPUT}-${EDGE_THRESHOLD}.pbm
|
||||
pnmcomp -alpha tmp/${INPUT}-${EDGE_THRESHOLD}.pbm black_1600x800.ppm tmp/$INPUT.ppm > tmp/$INPUT-aliased.ppm
|
||||
ppmquant -map palette.ppm tmp/$INPUT-aliased.ppm > tmp/$INPUT-quant.ppm
|
||||
|
||||
Reference in New Issue
Block a user