support for LARGE ALPHACOLOR was missing, made ALPHACOLOR always upper case

This commit is contained in:
Marcus 2024-01-31 01:34:56 +01:00
parent 4ac732eb7e
commit acf7b7e72b
2 changed files with 14 additions and 8 deletions

View file

@ -1,9 +1,9 @@
# pixelfloot
# ./pixelfloot
Origin: https://git.la10cy.net/DeltaLima/pixelfloot
an very simple and dirty pixelflut client to draw images, written in bash.
pixelfloot was built during the 37c3. in its actual state, its just a mess. I hope i will find time to put it in a more usable and readable format.
./pixelfloot.sh was built during the 37c3. in its actual state, its just a mess. I hope i will find time to put it in a more usable and readable format.
## examples
@ -80,7 +80,7 @@ PIPEVIEW(bool), VERBOSE(bool)
Running on my Ryzen 4700G with [wellenbrecher](https://github.com/bits0rcerer/wellenbrecher) 1280x720 and three workers,
i get around 1,5Gbit/s localhost traffic.
![pixelfloot screenshot](demo/screenshot_pixelfloot.png)
![./pixelfloot screenshot](demo/screenshot_pixelfloot.png)
## try it out

View file

@ -297,7 +297,13 @@ loadLOL() {
# max 64k each one
if [ $LARGE ]
then
LOL_org="$(echo "$LOL_org" | shuf)"
if [ -z "$ALPHACOLOR" ]
then
LOL_org="$(echo "$LOL_org" | shuf)"
else
LOL_org="$(echo "$LOL_org" | grep -v ${ALPHACOLOR^^} | shuf)"
fi
test -z "$LOLFIELDSIZE" && LOLFIELDSIZE=64000
# line counter
L=1
@ -327,8 +333,8 @@ loadLOL() {
message "load and shuffle pixels for frame ${YELLOW}$((${i}+1))/${LOLFIELDS}${ENDCOLOR}"
LOL[$i]="$(convertimg ${ANIFILE}-${i}.png | shuf)"
else
message "load and shuffle pixels for frame ${YELLOW}$((${i}+1))/${LOLFIELDS}${ENDCOLOR}, remove aplha color ${YELLOW}${ALPHACOLOR}${ENDCOLOR}"
LOL[$i]="$(convertimg ${ANIFILE}-${i}.png | grep -v $ALPHACOLOR | shuf)"
message "load and shuffle pixels for frame ${YELLOW}$((${i}+1))/${LOLFIELDS}${ENDCOLOR}, remove aplha color ${YELLOW}${ALPHACOLOR^^}${ENDCOLOR}"
LOL[$i]="$(convertimg ${ANIFILE}-${i}.png | grep -v ${ALPHACOLOR^^} | shuf)"
fi
#echo "${LOL[$i]}" | head
@ -346,8 +352,8 @@ loadLOL() {
message "shuffle pixels for [worker ${YELLOW}${i}${ENDCOLOR}]"
LOL[$i]="$(echo "$LOL_org" | shuf)"
else
message "remove aplha color ${YELLOW}${ALPHACOLOR}${ENDCOLOR} and shuffle pixels for [worker ${YELLOW}${i}${ENDCOLOR}]"
LOL[$i]="$(echo "$LOL_org" | grep -v $ALPHACOLOR | shuf)"
message "remove aplha color ${YELLOW}${ALPHACOLOR^^}${ENDCOLOR} and shuffle pixels for [worker ${YELLOW}${i}${ENDCOLOR}]"
LOL[$i]="$(echo "$LOL_org" | grep -v ${ALPHACOLOR^^} | shuf)"
fi
done