#!/usr/bin/perl use strict; use vars qw ($file $DELAY); ########## CONFIG $file = "lcd4linux"; # .png is appended $DELAY = 0; # delay in seconds # if delay is zero, file is sent when modified. ################# use CGI qw/:push -nph/; $| = 1; my ($mtime, $nmtime, $size, $nsize); (undef, undef, undef, undef, undef, undef, undef, $size, undef, $mtime) = stat "$file.png"; print multipart_init(-boundary=>'----------------here we go!'); while (1) { print multipart_start(-type=>'image/png'); undef $/; open(IN, "$file.png") or die("Can't read '$file.png'"); $_ = ; print $_; close(IN); print multipart_end; if ($DELAY) { sleep $DELAY; } else { W: while (1) { # sleep(1); (undef, undef, undef, undef, undef, undef, undef, $nsize, undef, $nmtime) = stat "$file.png"; if($mtime != $nmtime || $size != $nsize) { $mtime = $nmtime; $size = $nsize; last W; } } } } cCrohan
aboutsummaryrefslogtreecommitdiffstats
path: root/widget_image.h (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2008-04-04Add asterisk plugin, thanks to mcarey@yostengineering.commichux3-1/+197
2008-04-03fix typo, close #114michux1-1/+1
2008-04-03update charset for Crystalfontz Model 632 and 634michux2-3/+87
2008-03-05improve error messagesmichux1-7/+13
2008-03-03reformat plugin_mpd - use c style commentsmichux1-8/+8
2008-03-03correct code format (indent)michux1-2/+2
2008-03-03correct code format (indent)michux5-184/+185