_bw_new_height() – Return the new height – maintaining aspect ratio

You appear to be a bot. Output may be restricted

Description

Return the new height – maintaining aspect ratio

Usage

$integer = _bw_new_height( $aw, $ah, $rw, $rh );

Parameters

$aw
( integer ) required – actual width
$ah
( integer ) required – actual height
$rw
( integer ) required – required width
$rh
( integer ) required – required height

Returns

integer the new height

Source

File name: oik/includes/bw_images.inc
Lines:

1 to 8 of 8
function _bw_new_height( $aw, $ah, $rw, $rh ) {
  if ( $rh ) {
    $nh = $rh; 
  } else {
    $nh = ( $ah * $rw ) / $aw;
  }                   
  return( (int) $nh );  
}
 

 View on Trac