REname scale_img.sh to white_fourcell.sh and make sure that it works in full colorspace, was reducing source image to grayscale
This commit is contained in:
parent
ff910b9dae
commit
35b9deb07e
|
@ -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}"
|
Loading…
Reference in New Issue