Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Concatenating Images with Perl

by renodino (Curate)
on Dec 12, 2007 at 16:11 UTC ( #656661=note: print w/ replies, xml ) Need Help??


in reply to Concatenating Images with Perl

If you mean "tile" images, GD::Tiler may be a smaller/simpler alternative to Image::Magick.


Perl Contrarian & SQL fanboy


Comment on Re: Concatenating Images with Perl
Re^2: Concatenating Images with Perl
by Anonymous Monk on Dec 13, 2007 at 15:46 UTC
    here's some code from an old program of mine that concatenates two images (image1 and image2.png):
    $tempimage = new Image::Magick; $tempimage->Read('image1.png'); $temppg = new Image::Magick; $temppg->Read('image2.png'); $temppg->Resize(width=>400, height=>351, filter=>Box); $temppg->Border(height=>8, outer=>5, color=>'#FFFFFF'); $temppg->Border(width=>1, height=>1, color=>'#000000'); $comp = new Image::Magick(size=>'710x410'); $comp->Read( 'xc:white' ); #i think this sets the background color $comp->Composite(image=>$tempimage, gravity=>'southeast'); #this dete +rmines where the image will be placed (southeast = bottom right) $comp->Composite(image=>$temppg, gravity=>'southwest'); $comp->Annotate(gravity=>'north', text=>substr($names[$curimage],0,100 +)); #adds a title at the top of the image $comp->Write('concatenated.png');
    hope that helps...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://656661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2014-09-20 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls