Jun. 26th, 2010

anarres: (Default)
[personal profile] anarres
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-&gt;param('size') || '50';

print &quot;Content-type: image/gif\n\n&quot;;
my $gd=new GD::Image($cgi_size,$cgi_size);
my $blue=$gd-&gt;colorAllocate(0,0,255);
$gd-&gt;fill(0,0,$blue);
binmode STDOUT; #just in case we're on NT
print $gd-&gt;gif;
------------------------------


I'm stumped - has anyone got any ideas?
ninetydegrees: Art: self-portrait (Default)
[personal profile] ninetydegrees
Edit: all fixed!

I hope this isn't too off-topic but I've noticed I can no longer edit entries posted to communities on my Dreamhack: it doesn't recognize the poster - there's no name on editjournal - and all I get is the stuff maintainers can do even when poster *is* the maintainer. Does anybody else get that or have I just screwed things up somehow? I've only been working on styles lately so I doubt it but...
ninetydegrees: Art: self-portrait (Default)
[personal profile] ninetydegrees
I know some devs have journals specifically dedicated to Dreamwidth development and they may be of interest to people who want to learn (or not; no pressure and no expectations; this is your journal to do whatever you want with) so if you have one and don't mind sharing, would you please comment to indicate its name so that fellow devs can subscribe to it?

Edit: reading Cesy's comment, I realize some of you may also talk about it in your personal journals. Since we can set notifications and filters to work with tags, that can be useful too.

Profile

dw_dev_training: The stylised 'd', with the word 'dev' above, and the word 'training' at the side, representing the dw_dev_training comm. (Default)
Dreamwidth Development Training

September 2022

S M T W T F S
    123
45678910
1112131415 1617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 17th, 2025 04:39 am
Powered by Dreamwidth Studios