Hey,
thanks for your help on such short notice. I included the code snippet, image upload works, but there is no resize of the userpic image.
That's how it looks like:
{
$userpic = $HTTP_POST_VARS['userpic'] = $userpic_new = $userpic_name;
if ($user_info['userpic'] != $userpic_name && file_exists($userpics_dir.$user_info['userpic']))
{
@unlink($userpics_dir.$user_info['userpic']);
}
if (!function_exists(init_convert_options))
{
require(ROOT_PATH.'includes/image_utils.php');
}
$image_info = getimagesize($userpic_file);
$convert_options = init_convert_options();
if (($image_info[0] > $config['userpic_width'] || $image_info[1] > $config['userpic_height']))
{
$image_info = @getimagesize($src);
if ($image_info)
$wh = get_width_height($config['userpic_width'], $image_info[0], $image_info[1], 1);
if ($convert_options['convert_error'] || !$wh || (!$convert_options['convert_error'] && !resize_image_gd_thumb($userpic_file, $userpic_file, 85, $wh['width'], $wh['height'])))
{
if ($image_info[0] > $config['userpic_width'])
{
$error[] = $lang['invalid_image_width'];
}
if ($image_info[1] > $config['userpic_height'])
{
$error[] = $lang['invalid_image_height'];
}
}
}
}
You were assuming right, I have added the code for those thumbnails
I tried this too, but I assume it's wrong because I get sql errors:
$image_info = getimagesize($userpic_file);
$convert_options = init_convert_options();
if ($image_info)
$wh = get_width_height($config['userpic_width'], $image_info[0], $image_info[1], 1);
if ($convert_options['convert_error'] || !$wh || (!$convert_options['convert_error'] && !resize_image_gd_thumb($userpic_file, $userpic_file, 85, $wh['width'], $wh['height'])))
{
if ($image_info[0] > $config['userpic_width'])
{
$error[] = $lang['invalid_image_width'];
}
if ($image_info[1] > $config['userpic_height'])
{
$error[] = $lang['invalid_image_height'];
}
}
EDIT:
Replacing $image_info = @getimagesize($src); with $image_info = @getimagesize($userpic_file); shows me an error in the "resize_image_gd_thumb()". But I guess I am one step closer now.