I think there's a general issue when determining if an intermediate-sized image is needed or not.
During upload we have a similar check
if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate'] && !file_exists($normal)) {
as in the admin tools
if (max($imagesize[0], $imagesize[1]) > $CONFIG['picture_width'] && $CONFIG['make_intermediate']) {
It always checks the biggest size of the picture against the config value, which is wrong, as we have several settings for the resize method. E.g. we decide at several places in the code if we need the full-sized or intermediate-sized picture with code blocks like
// The weird comparision is because only picture_width is stored
$resize_method = $CONFIG['picture_use'] == "thumb" ? ($CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use']) : $CONFIG['picture_use'];
if ($resize_method == 'ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width']) {
$use_intermediate = true;
} elseif ($resize_method == 'wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']) {
$use_intermediate = true;
} elseif ($resize_method == 'any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
$use_intermediate = true;
} else {
$use_intermediate = false;
}
if ($CONFIG['make_intermediate'] && $use_intermediate) {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
This means we need also adjust the above two code lines accordingly. I'll update the code as soon as possible.