46,8 → 46,12 |
# at <http://p.outlyer.net/vcs/files/CHANGELOG>). |
# |
# 1.0.10: (2007-11-08) |
# * FEATURE: Allow explicitly disabling the timestamps (-dt or |
# * BUGFIX: Corrected aspect guessing bug: would fail if width |
# was standard but height not |
# * FEATURE: Allow explicitly disabling timestamps (-dt or |
# --disable timestamps) |
# * FEATURE: Allow explicitly disabling shadows (-ds or --disable shadows) |
# * Added HD resolution guessed aspect ratio (defaults to 16/9) |
# * OTHER: Changed e-mail address in the comments to gmail's, would probably |
# get a quicker response. |
# }}} # CHANGELOG |
282,6 → 286,9 |
# When set to 1 the signature won't contain the "Preview created by..." line |
declare -i anonymous_mode=0 |
|
# See chseet_montage for more details |
declare -i DISABLE_SHADOWS=0 |
|
# }}} # Variables |
|
# {{{ # Configuration handling |
884,25 → 891,44 |
guess_aspect() { |
# mplayer's ID_ASPECT seems to be always 0 ¿? |
local w=$1 h=$2 ar |
if [ $w -eq 352 ]; then # VCD / DVD @ VCD Res. / Half-D1 / CVD |
|
case "$w" in |
352) |
if [ $h -eq 288 ] || [ $h -eq 240 ]; then |
# Ambiguous, could perfectly be 16/9 |
# VCD / DVD @ VCD Res. / Half-D1 / CVD |
ar=4/3 |
elif [ $h -eq 576 ] || [ $h -eq 480 ]; then # Half-D1 / CVD |
elif [ $h -eq 576 ] || [ $h -eq 480 ]; then |
# Ambiguous, could perfectly be 16/9 |
# Half-D1 / CVD |
ar=4/3 |
fi |
elif [ $w -eq 704 ] || [ $w -eq 720 ]; then # DVD / DVB |
# Actually for 720x576/720x480 16/9 is as good a guess |
if [ $h -eq 576 ] || [ $h -eq 480 ]; then |
;; |
704|720) |
if [ $h -eq 576 ] || [ $h -eq 480 ]; then # DVD / DVB |
# Ambiguous, could perfectly be 16/9 |
ar=4/3 |
fi |
elif [ $w -eq 480 ]; then # SVCD |
if [ $h -eq 576 ] || [ $h -eq 480 ]; then |
;; |
480) |
if [ $h -eq 576 ] || [ $h -eq 480 ]; then # SVCD |
ar=4/3 |
fi |
else |
;; |
esac |
|
if [ -z "$ar" ]; then |
if [ $h -eq 720 ] || [ $h -eq 1080 ]; then # HD |
# TODO: Is there a standard for PAL yet? |
ar=16/9 |
fi |
fi |
|
if [ -z "$ar" ]; then |
warn "Couldn't guess aspect ratio." |
ar="$w/$h" # Don't calculate it yet |
fi |
|
echo $ar |
} |
|
1065,9 → 1091,14 |
esac |
# Using transparent seems to make -shadow futile |
montage -background Transparent "$@" -geometry +$hpad+$vpad -tile "$cols"x "$output" |
|
# This should actually be moved to a filter but with the current |
# architecture I'm unable to come up with the correct convert options |
if [ $DISABLE_SHADOWS -eq 0 ]; then |
# This produces soft-shadows, which look much better than the montage ones |
# |
convert \( -shadow 50x2+10+10 "$output" \) "$output" -composite "$output" |
fi |
#convert \( -shadow 50x2+10+10 "$output" \) "$output" -composite "$output" |
|
# FIXME: Error handling |
echo $output |
2090,7 → 2121,12 |
FILTERS_IND=${tmp[@]/filt_apply_stamp/} |
unset tmp |
;; |
# TODO: s|shadows|shadow |
s|shadows|shadow) |
if [ $DISABLE_SHADOWS -eq 0 ]; then |
inf "Shadows disabled." |
DISABLE_SHADOWS=1 |
fi |
;; |
*) |
error "Requested disabling unknown feature. Got '$2'." |
exit $EX_USAGE |