Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
"be consistent"
 
PerlMonks  

ImageMagick - composite

by ultranerds (Pilgrim)
on Dec 08, 2008 at 11:53 UTC ( #728907=perlquestion: print w/ replies, xml ) Need Help??
ultranerds has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys/gals,

I'm trying to do a "compasite" on a GIF,

`convert '/home/mystock/public_html/images/gif_image/9/758439-gif_6_badminton.gif' -resize 100x100 /home/mystock/public_html/user_thumbs/jpg/100/167765-100100.gif`

Now, it does the resizing ok - but for some reason, the "background" of the image comes up all black.

Anyone got any suggestions?

TIA!

Andy

Comment on ImageMagick - composite
Re: ImageMagick - composite
by Anonymous Monk on Dec 08, 2008 at 11:56 UTC
    contact imagemagick support forum :)
Re: ImageMagick - composite
by marto (Chancellor) on Dec 08, 2008 at 12:02 UTC
      Hi,

      Thanks for the replies guys. Managed to get around it by using:

      convert image.gif image.jpg

      (i.e converting them to JPG, before shrinking and watermaking :))

      Thanks again

      Andy
Re: ImageMagick - composite
by zentara (Archbishop) on Dec 08, 2008 at 15:27 UTC
    This works putting a blue square on a gif.
    #!/usr/bin/perl use warnings; use strict; use Image::Magick; my $x; my $null=Image::Magick->new; my $img=Image::Magick->new; $null->Set(size=>'20x20'); $x=$null->ReadImage('xc:blue'); warn "$x" if "$x"; $img->Set(size=>'640x470'); $x=$img->ReadImage('1z-squatch.gif'); warn "$x" if "$x"; $img->Composite(image=>$null, compose=>'Atop', gravity=>'Center', ); $img->Write("$0.gif");

    I'm not really a human, but I play one on earth Remember How Lucky You Are

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2014-04-21 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls