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 widthSource
File name: oik/includes/bw_images.incLines:
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 GitHub View on Trac