Skip to content

Commit

Permalink
only generate one image for pdf using convert command
Browse files Browse the repository at this point in the history
  • Loading branch information
bumblehead committed Mar 27, 2024
1 parent 5c7ac34 commit 0df1a61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions thu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ thumb_create_from_pdf_magick () {
"$pdf_thumb_path" 2>&1)
elif [[ -n "$is_cmd_convert" ]]; then
pdgimg_error=$(convert \
"$pdf_path" \
"${pdf_path}[0]" \
-define pdf:thumbnail=true \
-resize "$pdf_target_wh" \
"$pdf_thumb_path" 2>&1)
Expand Down Expand Up @@ -958,7 +958,6 @@ start () {
cachedir_calibrate "$cachedir" "$cache"

thumb_path=$(thumb_create_from "$path" "$target_wh_goal")

if [[ -n "$thumb_path" && -f "$thumb_path" ]]; then
paint "$thumb_path" "$target_wh_goal" "$target_format"
else
Expand Down

0 comments on commit 0df1a61

Please sign in to comment.