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:

Description

Calculates the new dimensions for a downsampled image.

Related Functions

wp_constrain_dimensions, wp_expand_dimensions, wp_render_dimensions_support, wp_image_src_get_dimensions, wp_register_dimensions_support

Top Google Results

User discussions

wpseek mobile