[magick-users] Creating Sprites for CSS

Bill Moseley moseley at hank.org
Wed Jul 30 22:55:39 PDT 2008


On Thu, Jul 31, 2008 at 02:01:15PM +1000, Anthony Thyssen wrote:
> Create the image using the above then 'Splice()' some extra space below
> that with gravity South.

I'm close.  Below adds the padding, but the background is black,
not transparent.

    $p->Read( @images );

    $p->Splice(
        width => 0,
        height => 50,
        gravity => 'South',
        background => 'none',
    );

    my $m = $p->Montage(
        mode => 'Concatenate',
        tile => '1x',
        background => 'none',
    );

    $m->Write( 'foo.gif' );

http://www.imagemagick.org/script/perl-magick.php shows
"background" as a possible attribute to Splice.

Am I doing something wrong?

-- 
Bill Moseley
moseley at hank.org
Sent from my iMutt



More information about the Magick-users mailing list