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 Origin: https://git.la10cy.net/DeltaLima/pixelfloot
an very simple and dirty pixelflut client to draw images, written in bash. 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 ## 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, Running on my Ryzen 4700G with [wellenbrecher](https://github.com/bits0rcerer/wellenbrecher) 1280x720 and three workers,
i get around 1,5Gbit/s localhost traffic. i get around 1,5Gbit/s localhost traffic.
![pixelfloot screenshot](demo/screenshot_pixelfloot.png) ![./pixelfloot screenshot](demo/screenshot_pixelfloot.png)
## try it out ## try it out

View File

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