Here's a simple hack, it's setup to work with jpg's but you
could modify it to accept any imagetype
It uses nph-push to push a new jpg every 30 seconds
I know it isn't a fancy module, but it works :-) I have the 2002
swimsuit models going as a test. :-)
#!/usr/bin/perl use warnings; use strict; $| = 1; my $boundary_string = "\n" . "--End" . "\n"; my $end_of_data = "\n" . "--End--" . "\n"; my $delay_time = 30; #seconds each is shown my $dir = 'images/'; #directory where images are my $pattern = '(.jpg)$'; #Filenames ending in .jpg opendir DIR, $dir or die "Cannot readdir $dir:$!\n"; my @files = grep /$pattern/,(readdir DIR); my @image_list= grep { $_ ne "." and $_ ne ".." } @files; closedir DIR; my $browser = $ENV{'HTTP_USER_AGENT'}; print<<EOH; Content-type: multipart/x-mixed-replace\;boundary=End EOH while(1){ for (my $loop=0; $loop < scalar (@image_list); $loop++) { &open_and_display_jpg ($image_list[$loop]); print $boundary_string; sleep ($delay_time); } } print $end_of_data; exit(0); sub open_and_display_jpg { my $file = $_[0]; if ( (open (FILE, "< $dir$file")) ) { my $content_length = (stat (FILE))[7]; print<<EOF; Content-type: image/jpg Content-length: $content_length EOF binmode FILE; print <FILE>; close (FILE); } else { #&return_error (500, "File Access Error", print "Cannot open graphic file $file!"; } }

In reply to Re: Looking for a good Perl web slideshow script or module by zentara
in thread Looking for a good Perl web slideshow script or module by grinder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.