#!/usr/bin/perl use strict; use GD; use GD::Text::Align; use GD::Text::Wrap; my $image = GD::Image->newFromJpeg('tv_click_no_words.jpg') || die(); my $black = $image->colorAllocate(0,0,0); my $string = 'Dan is the best!'; # my @bounds = $image->stringTTF($black, '/home/dvf5907/gd/fonts/comic.ttf', 10, 0, 15,20, $string ); my $black = $image->colorAllocate(0,0,0); # my $string = "Dan is the best!!!\nI'm the lizard king"; my $string = "hello?"; my $wrapbox = GD::Text::Wrap->new( $image, color => $black, text => $string ); $wrapbox->font_path( 'C:/winnt/fonts' ); #work_area/mod_perl/dans_website/gd/fonts' ); $wrapbox->set_font('comic.ttf', 10) || die (); $wrapbox->set( align => 'center', width => '122', preserve_nl => 1 ); $wrapbox->draw(10,5);