WordPress at a glance
function is not described

_image_get_preview_ratio() WP 2.9.0

Image preview ratio. Internal use only.

No Hooks.

Return

float/Int. Image preview ratio.

Usage

_image_get_preview_ratio( $w, $h );
$w(int) (required)
Image width in pixels.
$h(int) (required)
Image height in pixels.

Code of image get preview ratio: wp-admin/includes/image-edit.php VER 5.1.1

<?php
function _image_get_preview_ratio( $w, $h ) {
	$max = max( $w, $h );
	return $max > 400 ? ( 400 / $max ) : 1;
}