elif [ -n "$_POST[new_session]" ]; then
sid="$_POST[new_session]"
- identify "$_EXEC/templates/therapy_background.png" \
+ identify "$_EXEC/static/therapy_background.png" \
| sed -r 's;^.* ([0-9]+x[0-9]+) .*$;\1;' \
| read dim
printf '%s:exists\n' "$sid" >>"$tempfile"
printf '%s_open:checked\n' "$sid" >>"$tempfile"
-elif [ -n "$_POST[dotmark.x]" -a -n "$_POST[dotmark.y]" ]; then
- sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \
- | sort -n \
- | tail -n1 \
- | read sid
-
- x="$_POST[dotmark.x]"
- y="$_POST[dotmark.y]"
-
- convert "${tpyfile%.tpy}_${sid}.png" -draw "fill $_POST[color] circle $x,$y $(($x+5)),$y" "${tpyfile%.tpy}_${sid}.png"
-
elif [ -n "$_POST[imagedata]" ]; then
sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \
| sort -n \
| tail -n1 \
| read sid
- convert "${tpyfile%.tpy}_${sid}.png" -draw "${_POST[imagedata]}" -transparent white "${tpyfile%.tpy}_${sid}.png"
+ convert "${tpyfile%.tpy}_${sid}.png" \
+ -strokewidth 2 -fill '#00000000' \
+ -draw "${_POST[imagedata]}" -transparent white \
+ "${tpyfile%.tpy}_${sid}.png"
sync
fi