[gen_small_cover] Fixed bug where image would not be cropped

This commit is contained in:
ayakael 2018-07-22 19:46:20 -08:00
parent 1bbfed1313
commit e7596f0f82
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -12,7 +12,7 @@
gen_small_cover() { gen_small_cover() {
local COVER="${1}" local COVER="${1}"
convert "${COVER}" -resize 480x480^ -gravity center "$(sed 's|.png|.jpg|' <<<${COVER})" convert "${COVER}" -resize 480x480^ -gravity center -extent 480x480x0x0 "$(sed 's|.png|.jpg|' <<<${COVER})"
local EXIT=$? local EXIT=$?
cat "$(sed 's|.png|.jpg|' <<<${COVER})" cat "$(sed 's|.png|.jpg|' <<<${COVER})"
[[ ${EXIT} -ne 0 ]] && return 1 [[ ${EXIT} -ne 0 ]] && return 1