Notices


Reply
Thread Tools
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#1
when I'm back from my vacation i visit my grandmother and i show her my photos on her tv but image are not fullscreen.
i write a stupid script to adjust tvout image size
run the script press key followed by enter
q-quit saving values
r- restore previous values ( unplug av connector will reset to stupid values )
"a" / "s" move top left corner left / right
"d" / "f" move bottom right corner left / right
"w" / "x"move top left corner up / down
"e" / "c"move bottom right corner up / down

Code:
#!/bin/sh
p="/sys/devices/platform/omapdss/overlay2/position"
s="/sys/devices/platform/omapdss/overlay2/output_size"
a=`cat /sys/devices/platform/omapdss/overlay2/output_size`
b=`cat /sys/devices/platform/omapdss/overlay2/position`
xs=${b%%,*}
ys=${b##*,}
xd=${a%%,*}
yd=${a##*,}
echo $xs,$ys $xd,$yd
restore(){
r=`cat /opt/screen_dimensions`
xs=${r%%,*}
yd=${r##*,}
r=${r%,*};r=${r#*,}
xd=${r#*,}
ys=${r%,*}
echo $xs,$ys $xd,$yd
}
scrsz(){
echo $xs,$ys > $p
echo $xd,$yd > $s
}
while [ 1 ];do
setting=$(stty -g)
key=$(dd bs=1 count=1 2> /dev/null)
#stty "$setting"
case $key in
"a")xs=$(expr $xs - 1);;
"s")xs=$(expr $xs + 1);;
"w")ys=$(expr $ys - 1);;
"x")ys=$(expr $ys + 1);;
"d")xd=$(expr $xd - 1);;
"f")xd=$(expr $xd + 1);;
"e")yd=$(expr $yd - 1);;
"c")yd=$(expr $yd + 1);;
"q")echo $xs,$ys $xd,$yd;echo $xs,$ys,$xd,$yd > /opt/screen_dimensions;exit;;
"r")restore;;
esac
scrsz
done

Last edited by blue_led; 2011-02-07 at 21:17.
 

The Following 5 Users Say Thank You to blue_led For This Useful Post:
Posts: 152 | Thanked: 49 times | Joined on Dec 2009
#2
thanks for your script but where do you resize the tv out? i think you only move around the picture so less gets cut when using tv zoom modes or am i wrong?

ps: don't get me wrong i think this is useful in both cases
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:32.