me-tv-development team mailing list archive
-
me-tv-development team
-
Mailing list archive
-
Message #00542
Re: [Question #60873]: Optional streching of me-tv output to best fit resolution ignoring aspect-ratio?
Question #60873 on Me TV changed:
https://answers.launchpad.net/me-tv/+question/60873
CypherDelic gave more information on the question:
There where bugs in the code above.
Needed Variables:
$half-strength-value = 0
$strength-divider = !read settings-file
$broadcast-x = !read bc-signal-x
$broadcast-y = !read bc-signal-y
$desktop-x = !read desktop-resolution-x
$desktop-y = !read desktop-resolution-y
$output-x = $broadcast-x
$output-y = $broadcast-y
Optional (for easier code handling):
$fo-x = $broadcast-y / $desktop-y ) * $desktop-x
$fo-y = $broadcast-x / $desktop-x ) * $desktop-y
Function:
if ( ( $broadcast-x / $broadcast-y ) < ( $desktop-x / $desktop-y ) ) {
if ( $strength-divider = 1 ) {
$output-x = $fo-x;
$output-y = $broadcast-y;
} elseif ( $strength-divider = 2 ) {
$output-x = ( ( $fo-x - ( ( $fo-x - $broadcast-x ) / $strength-divider ) ;
$output-y = $broadcast-y;
}
} elseif ( ( $broadcast-x / $broadcast-y ) > ( $desktop-x / $desktop-y ) ) {
if ( $strength-divider = 1 ) {
$output-y = $fo-y ;
$output-x = $broadcast-x;
}
elseif ( $strength-divider = 2 ) {
$output-y = ( ( $fo-y - ( ( $fo-y - $broadcast-y ) / $strength-divider ) ;
$output-x = $broadcast-x;
}
Yap, now it is correct.
--
You received this question notification because you are a member of Me
TV Development, which is an answer contact for Me TV.