in reply to GD + layering text over existing image

As far as I can see, the only thing missing from your script is that you are creating a new image instead of loading an existing one. (Unsurprising I guess as it appears to be the code from the GD pod synopsis.)

If you replace my $im = new GD::Image(100,100); with

$im = GD::Image->new( $filename );

Provided that $filename contains the path and name of a image in any one of the formats GD supports (and that file is readable from the web server), then the rest of your code should work pretty much as it is, if you also change "Testing" for scalar localtime.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: GD + layering text over existing image
by ultranerds (Hermit) on Nov 22, 2008 at 14:34 UTC
    Hi, THANKS! Worked like a charm :) (always simple when you know how <G>) Cheers Andy
Re^2: GD + layering text over existing image
by Anonymous Monk on Aug 10, 2017 at 20:23 UTC
    Thank you very much.. I am new bee to perl CGI, working on some task from last two days... I made a small change i made as you suggested above, then it starts working... <3 ... For Perl CGI lack of materials.. i think Perl is not upgrading with the competitive IT world... For new bees it is very difficult to find some stuff and tutorials... And some days back i saw TPT is started training so i mailed them, its been 3 months still they didnt replied.. OK any way thanks for your suggestion.

      Wow. Nine years. That has to be a record for the longest time before receiving a response. Anyway, glad to have helped.

        Yes... Because of less support for Perl people are moving to other technologies. So @TPT and Perl team(Gabor) Please look in to this... :'(
      For new bees it is very difficult to find some stuff and tutorials

      Let's see. Where would a "new bee" start? Probably at perl.org. Click "Docs", click "Tutorials". Not so difficult.

      Where else might they start? Maybe with the FAQ where there's a whole section (number 2) about where to go for learning materials.

      Maybe they would come to PerlMonks where there's a Tutorials section linked on every page.

      Or maybe they would try a search engine like DuckDuckGo or Google

      If you could explain how these methods could be made less difficult for perl neophytes then that would be most illuminating.

        Let's see. Where would a "new bee" start? Probably at perl.org.

        Just browsing back over some good times and came across this post which I'd previously missed.

        That has to be the single most arrogant piece of 'I know it all, but I forgot how much time and effort I put in to learning it; and how f-ing hard it was to get started', dismissive, condescending, this-adds-nothing-to-this-thread-but-I-have-an-agenda-to-fulfill BS I've seen here in a while.

        But then, there's not much of anything said around here anymore; so I guess the odds were in your favour.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
        In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit