wp_shrink_dimensions
wp_shrink_dimensions ( $width, $height, $wmax = 128, $hmax = 96 )
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
See:Returns:- (array) Shrunk dimensions (width, height).
Defined at: - Introduced in WordPress: 2.0.0
- Deprecated in WordPress: 3.0.0
Description
Calculates the new dimensions for a downsampled image.