Dynamic images in Dreamwidth
Jun. 26th, 2010 09:30 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
This seems like it should be easy but I'm really stuck. I'm trying to dynamically display images - i.e. generate the image with a perl script and display it without saving it to the server.
This simple example works on my Heliohost server, but not on Dreamwidth (the example is from http://www.perlmonks.org/?node_id=18565):
--------test.shtml------------
<img src="test.cgi?size=100" alt="" />
------------------------------
--------test.cgi------------
#!/usr/bin/perl -w
use strict;
use CGI;
use GD;
my $cgi=new CGI;
my $cgi_size=$cgi->param('size') || '50';
print "Content-type: image/gif\n\n";
my $gd=new GD::Image($cgi_size,$cgi_size);
my $blue=$gd->colorAllocate(0,0,255);
$gd->fill(0,0,$blue);
binmode STDOUT; #just in case we're on NT
print $gd->gif;
------------------------------
I'm stumped - has anyone got any ideas?
This simple example works on my Heliohost server, but not on Dreamwidth (the example is from http://www.perlmonks.org/?node_id=18565):
--------test.shtml------------
<img src="test.cgi?size=100" alt="" />
------------------------------
--------test.cgi------------
#!/usr/bin/perl -w
use strict;
use CGI;
use GD;
my $cgi=new CGI;
my $cgi_size=$cgi->param('size') || '50';
print "Content-type: image/gif\n\n";
my $gd=new GD::Image($cgi_size,$cgi_size);
my $blue=$gd->colorAllocate(0,0,255);
$gd->fill(0,0,$blue);
binmode STDOUT; #just in case we're on NT
print $gd->gif;
------------------------------
I'm stumped - has anyone got any ideas?