| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doIdentityImageGrub { |
| |
| local FILE="$1" |
| local ACTION="$2" |
| local OPTIONS='' |
| |
| |
| local PREFIX='-14c' |
| |
| |
| |
| |
| |
| OPTIONS=$(render_getIdentityConfigOption "$ACTION" '2-') |
| |
| |
| |
| |
| |
| if [[ "$OPTIONS" =~ '-floyd' ]];then |
| PREFIX="${PREFIX}-floyd" |
| fi |
| |
| |
| |
| |
| for OPTION in $OPTIONS;do |
| |
| OPTION=$(echo -n $OPTION | cut -d'=' -f1) |
| if [[ "$OPTION" =~ "-(mapfile|verbose)" ]];then |
| cli_printMessage "`eval_gettext "The \\\$OPTION option is already used."`" |
| cli_printMessage "$(caller)" "AsToKnowMoreLine" |
| fi |
| done |
| |
| |
| local PALETTES=$(cli_getRepoTLDir)/Identity/Themes/Motifs/$(cli_getPathComponent '--theme')/Colors |
| |
| |
| |
| |
| local PALETTE_PPM=$PALETTES/grub.ppm |
| |
| |
| |
| |
| cli_printMessage "$PALETTE_PPM" 'AsPaletteLine' |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| cli_checkFiles $PALETTE_PPM |
| |
| |
| |
| |
| cli_printMessage "${FILE}.pnm" "AsSavedAsLine" |
| pngtopnm -verbose \ |
| < ${FILE}.png 2>${FILE}.log > ${FILE}.pnm |
| |
| |
| cli_printMessage "${FILE}${PREFIX}.ppm" "AsSavedAsLine" |
| pnmremap -verbose -mapfile=$PALETTE_PPM $OPTIONS \ |
| < ${FILE}.pnm 2>>${FILE}.log > ${FILE}${PREFIX}.ppm |
| |
| |
| cli_printMessage "${FILE}${PREFIX}.xpm.gz" "AsSavedAsLine" |
| ppmtoxpm \ |
| < ${FILE}${PREFIX}.ppm 2>>${FILE}.log > ${FILE}.xpm \ |
| && gzip --force ${FILE}.xpm \ |
| && mv ${FILE}.xpm.gz ${FILE}${PREFIX}.xpm.gz |
| |
| } |