_bw_new_width() – Return the new width – maintaining aspect ratio

You appear to be a bot. Output may be restricted

Description

Return the new width – maintaining aspect ratio

Usage

$integer = _bw_new_width( $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 width

Source

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

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

 View on Trac