wip large mode, slide pixlist into multiple fields
This commit is contained in:
parent
e01cb272cb
commit
ba5e40a603
2 changed files with 52 additions and 18 deletions
|
@ -48,7 +48,7 @@ available env vars to configure:
|
||||||
IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)
|
IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)
|
||||||
SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)
|
SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)
|
||||||
BORDERCOLOR(hex), X(int), Y(int), X_MAX(int), Y_MAX(int), H(int), W(int)
|
BORDERCOLOR(hex), X(int), Y(int), X_MAX(int), Y_MAX(int), H(int), W(int)
|
||||||
RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int)
|
RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int), LARGE(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,
|
||||||
|
|
|
@ -320,6 +320,32 @@ checkfile() {
|
||||||
|
|
||||||
loadLOL() {
|
loadLOL() {
|
||||||
|
|
||||||
|
# when LARGE true, then we slize the large pixlist into smaller pieces
|
||||||
|
# max 64k each one
|
||||||
|
if [ $LARGE ]
|
||||||
|
then
|
||||||
|
FIELDSIZE=64000
|
||||||
|
# line counter
|
||||||
|
L=1
|
||||||
|
LINES="$(echo "$LOL_org" | wc -l )"
|
||||||
|
FIELDS="$(( ( $LINES / $FIELDSIZE ) ))"
|
||||||
|
message "LARGE mode: slicing ${YELLOW}${IMGFILE}${ENDCOLOR} - ${YELLOW}${LINES}${ENDCOLOR} into ${YELLOW}${FIELDS}${ENDCOLOR} fields"
|
||||||
|
|
||||||
|
i=0
|
||||||
|
while [ $i -le $FIELDS ]
|
||||||
|
do
|
||||||
|
LN=$(($L+$FIELDSIZE+1))
|
||||||
|
message "field ${YELLOW}${i}${ENDCOLOR}, lines ${YELLOW}${L}${ENDCOLOR} - ${YELLOW}${LN}${ENDCOLOR}"
|
||||||
|
LOL[$i]="$(echo "$LOL_org" | sed -n "${L},$(($LN-1))p;${LN}q" )"
|
||||||
|
L=$LN
|
||||||
|
|
||||||
|
i=$(($i+1))
|
||||||
|
done
|
||||||
|
echo STOP
|
||||||
|
read
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
for i in $(seq 1 $FLOOTFORKS)
|
for i in $(seq 1 $FLOOTFORKS)
|
||||||
do
|
do
|
||||||
if [ -z "$ALPHACOLOR" ]
|
if [ -z "$ALPHACOLOR" ]
|
||||||
|
@ -332,6 +358,8 @@ loadLOL() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
floot() {
|
floot() {
|
||||||
|
@ -410,6 +438,11 @@ floot() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
message "starting $FLOOTFORKS workers"
|
message "starting $FLOOTFORKS workers"
|
||||||
|
|
||||||
|
if [ $LARGE ]
|
||||||
|
then
|
||||||
|
echo lol
|
||||||
|
else
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
for i in $(seq $FLOOTFORKS)
|
for i in $(seq $FLOOTFORKS)
|
||||||
|
@ -427,6 +460,7 @@ floot() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
@ -511,7 +545,7 @@ case $1 in
|
||||||
echo "IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)"
|
echo "IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)"
|
||||||
echo "SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)"
|
echo "SIZE(int), TEXT(string), FONTSIZE(int), BGCOLOR(hex), COLOR(hex)"
|
||||||
echo "BORDERCOLOR(hex), X(int), Y(int), X_MAX(int), Y_MAX(int), H(int), W(int)"
|
echo "BORDERCOLOR(hex), X(int), Y(int), X_MAX(int), Y_MAX(int), H(int), W(int)"
|
||||||
echo "RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int)"
|
echo "RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int), LARGE(bool)"
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue