Fixed bug for cover

This commit is contained in:
dbroqua 2021-06-11 12:02:08 +02:00
parent d23cc0079f
commit df603da5f8

View File

@ -84,7 +84,7 @@ for image in {*.jpg,*.JPG} ; do
# Compute new image size based on image type
if [ "${image}" == "${COVERFILE}" ] ; then
# Compute temporary with or height to crop correctly image
if [ "${COVERRATIO}" -gt "${TMPIMAGERATIO}" ] ; then
if (( $(echo "${COVERRATIO} >= ${TMPIMAGERATIO}" | bc -l) )) ; then
NEWHEIGHT=$((${WIDTH}*${COVERHEIGHT}/${COVERWIDTH}))
else
NEWWIDTH=$((${HEIGHT}*${COVERWIDTH}/${COVERHEIGHT}))