Hello Anthony,
I make a workaround to have labelling on 2 lines:
evaluate length of photo, then pre-processing polaroid thumbnails with caption on 1 or 2 lines
so make the index with montage from the thumbnails, end by removing the thumbnails.
Defaults:
Creating intermediate thumbnails, the html is not useful because it is on the thumbnails not on the source!
Lot of blank area between photos in the polaroid index
Each polaroid thumbnail is slightly curved
Do you know solution to solve these defaults?
Thanks
Code: Select all
for Photos in *
do
if [ -f "$Photos" ]
then
datePhoto=`echo "$Photos" | awk '{print substr($0,0,12)}'`
nomPhoto=`echo "$Photos" | awk '{print substr($0,14,32)}'`
nomPhoto2=`echo "$Photos" | awk '{print substr($0,46,50)}'`
# Make label with name on 1 or 2 lines in a polaroid thumbnail
# *[0] to take only the main picture
if [ -z "$nomPhoto2" ]
then
convert -caption "$datePhoto\n$nomPhoto\n %wx%h %b" $Photos[0] -thumbnail 240x240 \
-polaroid -0 $Photos"_thumb".png
else
convert -caption "$datePhoto\n$nomPhoto\n$nomPhoto2 %wx%h %b" $Photos[0] -thumbnail 240x240 \
-polaroid -0 $Photos"_thumb".png 2>> "$dateRep"_000_"$themeRep"_convert.error
fi
fi
done
# Index from polaroid thumbnails
echo " index`" type: aaaa-mm-jj-x_theme"
montage -size 500x500 *_thumb.png -geometry 200x+0+0 -title "$1" -tile 6x \
"$dateRep"_000_"$themeRep"_index.jpg
\rm *_thumb.png