Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

ImageMagick - composite

by ultranerds (Friar)
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 (Bishop) 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 romping around the Monastery: (7)
As of 2015-05-23 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (467 votes), past polls