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