Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/09/2004, 20:49
Avatar de GeoAvila
GeoAvila
Colaborador
 
Fecha de Ingreso: diciembre-2003
Ubicación: Antigua Guatemala
Mensajes: 4.032
Antigüedad: 20 años, 5 meses
Puntos: 53
Problema con acturalizar imagenes

hola pora alli me consegui este cosido de Axis
Código:
 #!c:/Perl/bin/perl.exe -w
 #
 #
 require 'stat.pl';
 #########################################################
 # Path to where the image file is stored
 $DIR = "C:/Archivos de programa/Apache Group/Apache2/htdocs/";
 #Filename the image is stored as
 $fileName = "cam0.jpg";
 #Maximum of images/s sent
 $freq = 2;
 #Max number of images to send on a connection
 $maxImages = 2900;
 #Max number of seconds until update is considered stopped
 #(ie the camera is no longer updating the image)
 $maxNoUpdate = 30;
 #########################################################
 $con_type = "jpeg";
 # Unbuffer the output so it streams through faster and better.
 $| = 1;
 # No input record separator when reading from file via <>.
 undef $/;
 # Print HTTP headers...
 # NOTE: If your web server returns "Error, faulty header"
 # The Line below must be commented away since your web server includes the
 # HTTP/1.0 200 OK on its own.
 print "HTTP/1.0 200 OK\n";
 print "Content-type: multipart/x-mixed-replace; boundary=--myboundary\n\n";
 print "--myboundary\n";
 $rounds=0;
 #max 400 images
 while ($rounds < $maxImages)
 {
 $rounds = $rounds +1;
 $basefile = $DIR . $fileName;
 @fstat = stat($basefile);
 # If the same image time stamp is on the image file for more then
 # X seconds then I presume that the image is no longer updated and will
 # End the connection
 if ($fstat[$ST_MTIME] ne $oldimagetime)
 {
 $sameCount = 0;
 $oldimagetime = $fstat[$ST_MTIME];
 }
 #We may send the same image multiple times but there is a strict limit
 if ($sameCount > ($maxNoUpdate * $freq))
 {
 die;
 }
 $sameCount = $sameCount +1;
 $rounds=$rounds +1;
 print "Content-type: image/$con_type\n\n";
 # This is where we act
 open(PIC,"$basefile");
 print STDOUT <PIC>;
 close(PIC);
 print "\n\n--myboundary\n";
 # Pause for 1/$freq seconds, if this time is more then a second
 # we recomend you replace with sleep(NbrOfSeconds)
 select(undef,undef,undef,(1/$freq));
 }
el cual sirve para acutalizar imagenes lo tenia en unix ahora lo quise montar en guindow$ y bueno ahora las imagenes aparecen distorcionadas, alguien tien alguna idea de porque...
les agradecería mucho su ayuda gracias...
__________________
* Antes de preguntar lee las FAQ, y por favor no hagas preguntas en las FAQ
Sitio http://www.geoavila.com twitter: @GeoAvila