adding horizontal band converter
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# run from parent dir "./tests/run_1.sh"
|
||||
for i in lion.jpg painting-swirl.jpg pink-cosmos.jpg radiant-color.jpg ;
|
||||
for i in `ls ../sample_images`
|
||||
do
|
||||
./scripts/slicer.sh ../sample_images/$i
|
||||
done
|
||||
|
|
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 27 KiB |
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
IMAGE=$1 # ./something/foo.png
|
||||
IMAGEBASE=$(basename $IMAGE) # foo.png
|
||||
IMAGEBASENOEXT=${IMAGEBASE%%.*} # foo
|
||||
OUTBASE=out
|
||||
OUTDIR=$OUTBASE/$IMAGEBASENOEXT
|
||||
|
||||
|
||||
mkdir -p $OUTDIR
|
||||
|
||||
# start with RGB, so from 200 vertical pixels divided by 16 palettes = 320x12.5 (we'll do 13 and remove extras)
|
||||
# we'll end up with 13 chunks of 320x13 (last one will be short) that are still full color
|
||||
convert -resize 320x200! -crop 320x13 $IMAGE $OUTDIR/$IMAGEBASENOEXT-%03d.band.png
|
||||
|
||||
# reduce each band to a 16 color palette
|
||||
for file in `ls $OUTDIR/$IMAGEBASENOEXT*.band.png`;
|
||||
do
|
||||
echo Working on splice: $file
|
||||
filebase=$(basename $file)
|
||||
filebasenoext=${filebase%%.*}
|
||||
dither=Riemersma
|
||||
dither=FloydSteinberg
|
||||
convert -colors 16 -depth 12 -dither $dither $file $OUTDIR/$filebasenoext.band16.png
|
||||
done
|
||||
|
||||
convert -append $OUTDIR/$IMAGEBASENOEXT*band16* $OUTBASE/$IMAGEBASENOEXT-FINAL.png
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# run from parent dir "./tests/run_1.sh"
|
||||
for i in `ls ../sample_images`
|
||||
do
|
||||
./scripts/slicer.sh ../sample_images/$i
|
||||
done
|
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 207 KiB |