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

Re: Transparency and Text Rendering

From: Mike Depot (
Date: Wed 02 May 2001 - 00:30:44 UTC

  • Next message: Tony Cook: "Re: Transparency and Text Rendering"

    Alternately, since you are generating the image dynamically, If you can
    specify the background color that the image will be used against as an input
    parameter to your perl script, then you can set the background of the
    generated image to match the background it will be used against. This would
    eliminate the need for a tranparency and allow you to use a GIF file format.
    Not sure if this applies to your situation, but I figured I'd offer it as a

    ----- Original Message -----
    From: "Mike Depot" <00853@xyz.molar.is>
    To: "Spohn, Albert F." <00885@xyz.molar.is>; <imager-devel@molar.is>
    Sent: Tuesday, May 01, 2001 8:24 PM
    Subject: Re: [Imager-devel]: Transparency and Text Rendering

    > Well I don't have enough experience with the Imager module to help you
    > much with the code, but I can tell you this... You'll need to switch image
    > formats or forget about the shadow. GIF format only supports transparency
    > allowing one of the colors in the pallete to be set to transparent. You
    > can't implement a blended shadow over a transparent background this way.
    > JPEG doesn't support transparency at all. What you need is a format that
    > supports an alpha channel. I'd suggest creating a PNG file instead if this
    > format is acceptable to your application.
    > ----- Original Message -----
    > From: "Spohn, Albert F." <00885@xyz.molar.is>
    > To: <imager-devel@molar.is>
    > Sent: Tuesday, May 01, 2001 6:04 PM
    > Subject: [Imager-devel]: Transparency and Text Rendering
    > > I'm absolutely new to this module, and fairly new to perl as well. I'm
    > > trying to dynamically generate a gif that is basically a text string
    > > will change color based on external criteria. One of the requirements
    > > that everything but the letters be transparent. To get started, I've
    > > manipulating the code example here:
    > >
    > > http://www.eecs.umich.edu/~addi/perl/Imager/ex_code/ex7/
    > >
    > > I'm hoping that if someone can make the background of the banner in the
    > > example transparent and show me the code snippet, I can adapt it readily
    > to
    > > my little project. Any other advice, FAQ's etc are of course more than
    > > welcome as well.
    > >
    > > Thanks very much in advance,
    > >
    > > Al Spohn
    > >
    > > Al Spohn
    > > Publishing and Media Technology Services
    > > Mayo Clinic 507-284-1666
    > >
    > >