Skip to content

Commit

Permalink
add additional debug output file bigthumbdim
Browse files Browse the repository at this point in the history
  • Loading branch information
idcrook committed Jan 29, 2023
1 parent d0748cc commit bc8d0f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ runtimestamp
workdir
args
gcode
bigthumbdim
12 changes: 11 additions & 1 deletion generate_S3D_thumbnails.bash
Expand Up @@ -40,6 +40,8 @@ GCODE="${1:-sample.gcode}"

WORKDIR="$TMPDIR"
#WORKDIR="$INSTALL_DIR"
# always add trailing slash
WORKDIR="${WORKDIR%/}/"

RETINA_2X_MODE_DETECTED=0
DEFAULT_APP_WIDTH=1100
Expand Down Expand Up @@ -153,11 +155,19 @@ b64cmd2="${BASE64} -b 76 -i ${WORKDIR}bigthumb.png"
set +o xtrace # turn off debug tracing output
##echo $b64cmd2
OUTPUT=$($b64cmd2)
# include image dimensions and length of base64 encode string

# Include additional info if tracing turned on
if [[ "${TRACESTATE}" == 'set -o xtrace' ]] ; then
echo "${bigthumbdim} ${#OUTPUT}" > "${INSTALL_DIR}bigthumbdim"
fi
echo "${bigthumbdim} ${#OUTPUT}"

# include image dimensions and length of base64 encode string
echo "thumbnail begin ${bigthumbdim} ${#OUTPUT}" >> "${WORKDIR}base64.txt"
echo "${OUTPUT}" >> "${WORKDIR}base64.txt"
echo "thumbnail end" >> "${WORKDIR}base64.txt"


eval "$TRACESTATE" # restore state of xtrace option.

########################################################################
Expand Down

0 comments on commit bc8d0f0

Please sign in to comment.