Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/09/2014, 19:24
Avatar de josecmorales
josecmorales
 
Fecha de Ingreso: noviembre-2003
Ubicación: Puerto Ordaz/ Venezuela
Mensajes: 1.161
Antigüedad: 20 años, 6 meses
Puntos: 4
Cambiar tamaño de imagen "autorefrescada"

Buen día amigos, se casi nada de JS, conseguí un script en PHP que trae una imagen de una camara IP, el problema es que se trae el tamaño maximo (1280*720), y sólo quiero que se vea en 640*360, es posible esto?, anexo copia del script para que lo detallen.

Código:
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demostración de cámara IP www.Foscam.es</title>
</head>

<script type='text/javascript'> 
	var URL='http://<?php echo"$url:$puerto/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=$user&pwd=$pass";?>'; 
	var L=window.location.search; 
	L=L.substring(1,5); 
	if(L=="")L=1; 
	NuevaImagen=new Image(); 
	var I=new Date().getTime(); 
	var imgW=640*L; 
	function Refresca(){document.getElementById("Mostrada").src=URL+'&'+I++;} 
</script> 
</head> 
<body onload=Refresca()> 
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="640" height="360" bgcolor="#FF9900" > 
  <tr> 
    <td width="640" height="80" align="center"> 
		<h2>Demostración de cámara IP <a href="http://www.foscam.es" target="_blank">www.foscam.es</a></h2>
    </td> 
  </tr> 
  <tr> 
    <td width="640" height="360"> 
    <img id="Mostrada" border=0 onload=setTimeout("Refresca()",10) onerror=setTimeout("Refresca()",100)> 
   </td> 
  </tr> 
</table> 
</div> 
</body> 
</html>
Ojo la dirección de la toma instantánea se define arriba del script
__________________
"...El pueblo se acostumbra a obedecerle y él se acostumbra a mandarlo; de donde se origina la usurpación y la tiranía..." Bolívar 1819.