From 35b9deb07e7d39b4f063dec9d57dd6b9bb453415 Mon Sep 17 00:00:00 2001 From: mmattmcw Date: Fri, 24 Feb 2023 15:38:33 -0500 Subject: [PATCH] REname scale_img.sh to white_fourcell.sh and make sure that it works in full colorspace, was reducing source image to grayscale --- scale_img.sh => white_fourcell.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename scale_img.sh => white_fourcell.sh (84%) diff --git a/scale_img.sh b/white_fourcell.sh similarity index 84% rename from scale_img.sh rename to white_fourcell.sh index 1d499eb..fcd0f2b 100644 --- a/scale_img.sh +++ b/white_fourcell.sh @@ -34,9 +34,9 @@ IW=$(echo "scale=${DIGITS};${OW}*${SCALE}" | bc | awk -F'.' '{print $1}') IH=$(echo "scale=${DIGITS};${IW}*${R}" | bc | awk -F'.' '{print $1}') TMP=$(mktemp -d) -convert -size ${OW}x${OH} xc:#FFFFFF "${TMP}/white.png" +convert -size ${OW}x${OH} -colorspace sRGB xc:#FFFFFF "${TMP}/white.png" convert "${2}" -resize ${IW}x${IH} "${TMP}/resize.tif" -composite -gravity Center "${TMP}/resize.tif" "${TMP}/white.png" "${3}" +composite -gravity Center -colorspace sRGB "${TMP}/resize.tif" "${TMP}/white.png" "${3}" rm -rf "${TMP}" echo "Centered in white ${2} -> ${3}" \ No newline at end of file