(none) imager-devel
/ help / lists / applications / search /
 

Re: scale a gif and background turns black

From: Delfim Machado (
14018@xyz.molar.is)
Date: Mon 27 Jun 2005 - 13:07:53 GMT

  • Next message: Tony Cook: "Re: scale a gif and background turns black"

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Hi Tony, this is my code

    use strict;
    use Imager;

    my $img = Imager->new;

    $img->read(file=>"./303411.gif");

    my $thumb = $img->scale(xpixels=>100, ypixels => 100, type => 'min');

    $thumb->write(file=>'test.gif', transp=>'threshold');

    - ----

    this is the file
    http://www.sapo.pt/gfx/303411.gif

    the background stays black.

    i'm using Imager-0.45 and libungif4g 4.1.3-2 (debian package)

    On Jun 27, 2005, at 13:50, Tony Cook wrote:

    > On Mon, Jun 27, 2005 at 01:21:50PM +0100, Delfim Machado wrote:
    >
    >> -----BEGIN PGP SIGNED MESSAGE-----
    >> Hash: SHA1
    >>
    >> Hi!
    >>
    >> i'm using Imager to create thumbnails but in some gif files the
    >> background turns black, this happens on my transparent gifs.
    >>
    >> What can i do to correct this?
    >>
    >
    > Call the write() method with transp=>'threshold':
    >
    > $img->write(file=>$somefilename, transp=>'threshold');
    >
    > The documentation needs some examples there, noted for 0.46.
    >
    > Tony
    >
    >
    >

    - --
    Delfim Machado

    ~ "Serei sempre o que nunca irei ser! Sempre serei o que nunca vais
    ver!" - Eu mesmo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (Darwin)

    iD8DBQFCv/ot6XDsmUqBS/QRAsMSAKDJuKzkDLhxrXueyJPt6EotSs8jfQCfTEei
    sjcpaVTKKTeDFDe2oiLUsZQ=
    =FDAA
    -----END PGP SIGNATURE-----



  •