diff --git a/KEITHLEY-617/createImages b/KEITHLEY-617/createImages index 4e8e1e8a0035a7da874a074aaa4dd6c6fa7eaadf..866f1098f91ae259d891f4844b38154888e75007 100755 --- a/KEITHLEY-617/createImages +++ b/KEITHLEY-617/createImages @@ -11,7 +11,7 @@ MAIN="KEITHLEY-617" # device name IMAGE_DIR=./images -MAX_DIGITS=7 # do not edit! +MAX_DIGITS=8 # do not edit! MAX_FILES=10 # do not edit! NUMBER_OF_DIGITS=$MAX_DIGITS @@ -52,6 +52,7 @@ digitFile[7]='digit-7.png' digitFile[8]='digit-8.png' digitFile[9]='digit-9.png' digitFile[10]='minus.png' +digitFile[11]=$emptyCanvas NUM2CHAR[0]='0' NUM2CHAR[1]='1' @@ -64,14 +65,16 @@ NUM2CHAR[7]='7' NUM2CHAR[8]='8' NUM2CHAR[9]='9' NUM2CHAR[10]='-' +NUM2CHAR[11]='_' digitPos[1]='+57+123' digitPos[2]='+101+123' digitPos[3]='+145+123' digitPos[4]='+189+123' digitPos[5]='+233+123' -digitPos[6]='+321+123' -digitPos[7]='+365+123' +digitPos[6]='+277+123' +digitPos[7]='+321+123' +digitPos[8]='+365+123' dotPos[1]=${digitPos[1]} dotPos[2]=${digitPos[2]} @@ -80,6 +83,7 @@ dotPos[4]=${digitPos[4]} dotPos[5]=${digitPos[5]} dotPos[6]=${digitPos[6]} dotPos[7]=${digitPos[7]} +dotPos[8]=${digitPos[8]} for ((FNb=1; FNb<=MAX_FILES; FNb++)); do @@ -87,11 +91,8 @@ value="" DPR=$((RANDOM % $NUMBER_OF_DIGITS + 1)) # random dot position (1..$NUMBER_OF_DIGITS) for (( i=1; i<=$MAX_DIGITS; i++ )); do if (( $i <= $NUMBER_OF_DIGITS )); then - R=$((RANDOM % 11)) # random digit number (0..10='0'..'-') + R=$((RANDOM % 12)) # random digit number (0..11='0'..'_') eval DIGIT$i=${digitFile[R]} - if (( $i == 6 )); then - value+="_" - fi value+="${NUM2CHAR[R]}" if [ $DPR == $i ]; then eval DOT$i="$dotFile" @@ -124,6 +125,8 @@ convert body.png \ $DOT6 -geometry ${dotPos[6]} -composite \ $DIGIT7 -geometry ${digitPos[7]} -composite \ $DOT7 -geometry ${dotPos[7]} -composite \ + $DIGIT8 -geometry ${digitPos[8]} -composite \ + $DOT8 -geometry ${dotPos[8]} -composite \ $fname exiv2 -M"set Exif.Image.ImageDescription value=$value" $fname diff --git a/KEITHLEY-617/dot.png b/KEITHLEY-617/dot.png index cfdbf2d72d6f3a5408b0f3becf336e69e8a5c4d5..b0dee00394c1c884ee6792cb6d7665743feadf5a 100644 Binary files a/KEITHLEY-617/dot.png and b/KEITHLEY-617/dot.png differ