Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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?



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 (Bishop) on Dec 08, 2008 at 12:02 UTC

      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

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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2015-04-02 02:11 GMT
Find Nodes?
    Voting Booth?

    Who makes your decisions?

    Results (55 votes), past polls