From ed2fd5a8d0d90dcedf85e9375057fbc43b619543 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: May 12 2011 15:56:25 +0000 Subject: Update render_svg_convertPngToThumbnail.sh. --- diff --git a/Scripts/Functions/Render/render_svg_convertPngToThumbnail.sh b/Scripts/Functions/Render/render_svg_convertPngToThumbnail.sh index bfad60f..f9cd85f 100755 --- a/Scripts/Functions/Render/render_svg_convertPngToThumbnail.sh +++ b/Scripts/Functions/Render/render_svg_convertPngToThumbnail.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# svg_convertPngToThumbnail.sh -- This function provides post-rendition to +# render_svg_convertPngToThumbnail.sh -- This function provides post-rendition to # create thumbnails from images produced by centos-art base-rendition. # Thumbnails are created in PNG and JPG format for you to decide which # is the more appropriate one. When no size is specified, thumbnails @@ -27,27 +27,27 @@ # $Id$ # ---------------------------------------------------------------------- -function svg_convertPngToThumbnail { +function render_svg_convertPngToThumbnail { # Get image size. local SIZES=$(render_getConfigOption "$ACTION" '2-') - # Check base file existence. - cli_checkFiles "${FILE}.png" - # Check image sizes and do convertion. if [[ "$SIZES" == "" ]];then SIZES='250' fi + # Check base file existence. + cli_checkFiles "${FILE}.png" + # Create thumbnails. for SIZE in $SIZES;do cli_printMessage "${FILE}-thumb-${SIZE}.png" --as-savedas-line - convert -resize ${SIZE} ${FILE}.png ${FILE}-thumb-${SIZE}.png + convert -thumbnail ${SIZE} ${FILE}.png ${FILE}-thumb-${SIZE}.png cli_printMessage "${FILE}-thumb-${SIZE}.jpg" --as-savedas-line - convert -resize ${SIZE} ${FILE}-thumb-${SIZE}.png ${FILE}-thumb-${SIZE}.jpg + convert -thumbnail ${SIZE} ${FILE}-thumb-${SIZE}.png ${FILE}-thumb-${SIZE}.jpg cli_printMessage "${FILE}-thumb-${SIZE}.pdf" --as-savedas-line - convert -resize ${SIZE} ${FILE}-thumb-${SIZE}.png ${FILE}-thumb-${SIZE}.pdf + convert -thumbnail ${SIZE} ${FILE}-thumb-${SIZE}.png ${FILE}-thumb-${SIZE}.pdf done }