3

Need help with perl imagemagick!

I am trying to put a png watermark on jpg image,

$image = Image::Magick->new;
$image->Read('image_filename');

$logo = Image::Magick->new;
$logo->Read('watermark_filename');

$logo->Transparent(color=>'#FFFFFF');
$image->Composite(image=>$logo, gravity=>'southeast', geometry=>'-10-10'); 
$image->Write('final_filename');

Everything is ok, but I need my watermark is be transparent, when I am trying opacity=>'50%' it works, but the watermark png starts look like s...t:))

voodoo
  • 31
  • 1
  • If you are reading the watermark from a file anyway, why not store the watermark file as an already transparent image? It might eliminate the problem. And the less you have to do programmatically the better. – dan1111 Sep 24 '12 at 11:19
  • 1
    Of course it will eliminate the problem, but I need to know the right solution!:) How to change an opacity of the transparent png correctly, by perl imagemagick?? – voodoo Sep 24 '12 at 12:31
  • Fair enough. Just trying to think of a quick fix for your problem. – dan1111 Sep 24 '12 at 13:47

1 Answers1

0

Have you considered creating the watermark by hand using GIMP or perlgrammaticly via GD?