| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function render_doIdentityImageSyslinux { |
| |
| local FILE=$1 |
| local ACTION="$2" |
| local OPTIONS='' |
| |
| |
| local PREFIX='-16c' |
| |
| |
| |
| |
| |
| OPTIONS=$(render_getConfOption "$ACTION" '2-') |
| |
| |
| |
| |
| for OPTION in $OPTIONS;do |
| |
| OPTION=$(echo $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 |
| |
| |
| |
| |
| |
| if [[ "$OPTIONS" =~ '-floyd' ]];then |
| PREFIX="${PREFIX}-floyd" |
| fi |
| |
| |
| local PALETTES=/home/centos/artwork/trunk/Identity/Themes/Motifs/$(cli_getThemeName)/Colors |
| |
| |
| |
| |
| local PALETTE_PPM=$PALETTES/syslinux.ppm |
| |
| |
| |
| |
| local PALETTE_HEX=$PALETTES/syslinux.hex |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| cli_checkFiles $PALETTE_PPM |
| cli_checkFiles $PALETTE_HEX |
| |
| |
| |
| |
| cli_printMessage "$FILE.pnm" "AsSavedAsLine" |
| pngtopnm -verbose \ |
| < $FILE.png \ |
| 2>$FILE.log > $FILE.pnm |
| |
| |
| |
| |
| cli_printMessage "$FILE${PREFIX}.pnm" "AsSavedAsLine" |
| pnmremap -verbose -mapfile=$PALETTE_PPM $OPTIONS \ |
| < $FILE.pnm \ |
| 2>>$FILE.log > $FILE${PREFIX}.pnm |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| cli_printMessage "$FILE${PREFIX}.lss" "AsSavedAsLine" |
| PALETTE_HEX=$(cat $PALETTE_HEX | tr "\n" ' ' | tr -s ' ') |
| ppmtolss16 $PALETTE_HEX \ |
| < $FILE${PREFIX}.pnm \ |
| 2>>$FILE.log \ |
| > $FILE${PREFIX}.lss |
| |
| |
| |
| |
| cli_printMessage "$FILE${PREFIX}.ppm" "AsSavedAsLine" |
| lss16toppm -map < $FILE${PREFIX}.lss \ |
| 2>>$FILE.log \ |
| > $FILE${PREFIX}.ppm |
| |
| |
| cli_printMessage "$FILE${PREFIX}.png" "AsSavedAsLine" |
| pnmtopng -verbose -palette=$PALETTE_PPM \ |
| < $FILE${PREFIX}.pnm \ |
| 2>>$FILE.log \ |
| > $FILE${PREFIX}.png |
| |
| } |