Advertisements

wp_shrink_dimensions

Definition:
function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {}

Calculates the new dimensions for a downsampled image.

Parameters

  • int $width: Current width of the image
  • int $height: Current height of the image
  • int $wmax: Maximum wanted width
  • int $hmax: Maximum wanted height

Return values

returns:Array(height,width) of shrunk dimensions.

Source code

function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {

	_deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );

	return wp_constrain_dimensions( $width, $height, $wmax, $hmax );

}

4127

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: