Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Image::magick visible watermark help

by valdez (Monsignor)
on Jun 24, 2004 at 15:10 UTC ( [id://369384]=note: print w/replies, xml ) Need Help??


in reply to Image::magick visible watermark help

Try using 'Plus' composition option, for example:

#!/usr/bin/perl use Image::Magick; use LWP::Simple; LWP::Simple::mirror('http://s.a.cnn.net/si/features/2004_swimsuit/imag +es/gallery/popup/may_03.jpg', './base.jpg'); $base = Image::Magick->new(); $base->Read('./base.jpg'); ($width, $height) = $base->Get('width', 'height'); $watermark = Image::Magick->new(); $watermark->Set(size => "${width}x${height}"); $watermark->ReadImage('xc:white'); $watermark->Transparent( color => white ); $watermark->Annotate(pointsize => 36, fill => 'red', text => '1st Italian Perl Workshop\nPisa, 19 + e 20 Luglio 2004', gravity => 'center'); $watermark->Composite(image => $base, compose => 'Plus', gravity => 'Center'); $watermark->Write('./composition.jpg'); $watermark->Display;

Ciao, Valerio

Replies are listed 'Best First'.
Re^2: Image::magick visible watermark help
by bear0053 (Hermit) on Jun 24, 2004 at 19:28 UTC
    to make it work with an image use a png-8 image that is a light colored logo and transparent by design. then have it outlined in a more standoutish color. that solved the problem for me. it appears the original code worked fine but my image choice was messing the display up. Thanks UPDATE=== downvoted bc why...that is the solution

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-26 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found