Srs.
Esto no es correcto:
$info = getimagesize($_FILES['bandera']['filename']);
$anchura = imagesx($info);
$altura = imagesy($info);
lo que las funciones tipo imagesX o Y requieren es un "resource de imagen" generado por imagecreatefromXXX() funciones ..
La función getimagesize() de por sí ya entrega esa información (alto/ancho) en un array:
http://www.php.net/getimagesize Cita: User Contributed Notes
getimagesize
jlratwil at yahoo dot com
08-Nov-2006 10:10
Data types of the output array for getimagesize().
[0] = The width of the image. It is integer data type.
[1] = The height of the image. It is an integer data type.
[2] = Image Type Flag. It is an integer data type.
[3] = String for <img> tag (width="xxx" height="xxx"). It is a string data type.
[bits] = Number of bits. It is an integer data type.
[channels] = Number of channels. It is an integer data type.
[mime] = MIME type. It is a string data type.
Un saludo,