DigitalKitty has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use GD; use GD::Text; my $image = new GD::Image( 320, 160 ); my $black = $image->colorAllocate( 0, 0, 0 ); my $text = new GD::Text->new( $image, font => gdLargeFont, text => "Perl Coder", color => "white", valign => "top", halign => "center", ); $title->draw( IMAGE_SIZE / 2 TITLE_Y_COORD ); $image->filledRectangle( 15, 15, 150, 150, $black ); open( IMAGE, ">pc1.png") || die "Couldn't open file: $!\n"; binmode( IMAGE ); print IMAGE $image->png(); close IMAGE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating an image with GD.
by hossman (Prior) on Aug 09, 2002 at 07:03 UTC | |
|
Re: Creating an image with GD.
by dws (Chancellor) on Aug 09, 2002 at 05:04 UTC | |
|
Re: Creating an image with GD.
by DigitalKitty (Parson) on Aug 09, 2002 at 13:33 UTC | |
|
Re: Creating an image with GD.
by hawtin (Prior) on Aug 10, 2002 at 07:52 UTC | |
by Anonymous Monk on Aug 10, 2002 at 16:04 UTC | |
|
Re: Creating an image with GD.
by Anonymous Monk on Aug 12, 2002 at 12:24 UTC |