thumbs=$( find "$video_dir" -type f -iname *-thumb.png )
num_imgs=$( echo $THUMBS | wc -w )
num_rows=$(( $num_imgs / 8 ))
lefto=$(( $num_imgs % 8 ))
if [ $lefto -gt 0 ]; then
num_rows=$(( $num_rows + 1 ))
fi
montage $thumbs -geometry 200x150 -label '%f' -tile 8x$num_rows $video_dir/contact_sheet.png
--
You received this message because you are subscribed to the Google Groups "Digital Curation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to digital-curati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/digital-curation/28a9bb4a-f988-401e-9da0-73fec499bc99n%40googlegroups.com.
--
One, passing it a list of files to compile into a contact sheet has been a little weird; I currently have a workaround which puts the thumbnail filenames into a .txt file (and then later deletes the .txt file). I feel sure there's some more straightforward way to do this
Two, the -label '%f' option isn't working.
I'm copying the relevant portion of the script below. If anyone has any ideas—or if there's an existing solution to this entire thing I'm trying to do 🙈—I'd really appreciate it.find "$video_dir" -type f -iname *-thumb.png > $video_dir/thumb_list.txt
read num_imgs <<< $(sed -n '$=' thumb_list.txt)
let num_rows=num_imgs/8
let lefto=num_imgs%8
if [ $lefto -gt 0 ]
then
let num_rows=num_rows+1
fi
montage @$video_dir/thumb_list.txt -geometry 200x150 -label '%f' -tile 8x$nrow $video_dir/contact_sheet.png
rm $video_dir/thumb_list.txt
To view this discussion on the web visit https://groups.google.com/d/msgid/digital-curation/CAM8-2UrtTGreOpGf1%3D8zziYBM_8asXbksP86C817hQ39MZumog%40mail.gmail.com.
- - - - - – - – – -