$full_width =
$imagesize[0
];
$full_height =
$imagesize[1
];
} else { $full_width =
(int) $image_meta['width'
];
$full_height =
(int) $image_meta['height'
];
} $possible_sizes = array
();
// Skip registered sizes that are too large for the uploaded image.
foreach ( $registered_sizes as $size_name =>
$size_data ) { if ( image_resize_dimensions( $full_width,
$full_height,
$size_data['width'
],
$size_data['height'
],
$size_data['crop'
] ) ) { $possible_sizes[ $size_name ] =
$size_data;
} } if ( empty( $image_meta['sizes'
] ) ) { $image_meta['sizes'
] = array
();
} /*
* Remove sizes that already exist. Only checks for matching "size names".
* It is possible that the dimensions for a particular size name have changed.
* For example the user has changed the values on the Settings -> Media screen.
* However we keep the old sub-sizes with the previous dimensions
* as the image may have been used in an older post.
*/