Al final de la ejecucion contiene
$function_to_read = 'ImageCreateFromJPEG';
Si realmente no uso la variable-funcion, sinó la función imagecreatefromJPEG() me funciona bien, en cambio usando la variable funcion, no.
Código PHP:
$prop=GetImageSize($ruta);
$img_ancho = $prop[0];
$img_alto = $prop[1];
$img_tipo = $prop[mime];
$gd_function_suffix = array(
'image/pjpeg'=>'JPEG',
'image/jpeg' =>'JPEG',
'image/gif' =>'GIF' ,
'image/bmp' =>'WBMP',
'image/x-png'=>'PNG');
$function_suffix = $gd_function_suffix[$img_tipo];
$function_to_read = 'ImageCreateFrom'.$function_suffix;
$function_to_write = 'Image'.$function_suffix;
$fuente = $function_to_read($ruta);
//$fuente = ImageCreateFromJPEG($ruta);