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)
|
||||
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)
|
||||
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,
|
||||
|
|
|
@ -320,6 +320,32 @@ checkfile() {
|
|||
|
||||
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)
|
||||
do
|
||||
if [ -z "$ALPHACOLOR" ]
|
||||
|
@ -332,6 +358,8 @@ loadLOL() {
|
|||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
floot() {
|
||||
|
@ -410,6 +438,11 @@ floot() {
|
|||
esac
|
||||
|
||||
message "starting $FLOOTFORKS workers"
|
||||
|
||||
if [ $LARGE ]
|
||||
then
|
||||
echo lol
|
||||
else
|
||||
while true
|
||||
do
|
||||
for i in $(seq $FLOOTFORKS)
|
||||
|
@ -427,6 +460,7 @@ floot() {
|
|||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
@ -511,7 +545,7 @@ case $1 in
|
|||
echo "IPFLOOT(string), FLOOTPORT(int), USECACHE(bool), FLOOTFORKS(int)"
|
||||
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 "RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int)"
|
||||
echo "RESIZE(int), ALPHACOLOR(hex), BOUNCESTEP(int), LARGE(bool)"
|
||||
|
||||
exit 1
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue