transparent GIF

Discussion in 'HTML' started by Alfred Lorona, Feb 13, 2004.

  1. I have a line drawn cartoon which I wish to put on a web page. Photo Shop
    saves in GIF89a format which renders it transparent. I do not want the
    colored background to show through the cartoon . How do I instruct html to
    render the background white or non-transparent?

    Thanks, AL
    Alfred Lorona, Feb 13, 2004
    #1
    1. Advertising

  2. Alfred Lorona

    Paul Furman Guest

    Alfred Lorona wrote:
    > How do I instruct html to
    > render the background white or non-transparent?


    You will need a graphics program to convert the file. I should warn you
    though that the results are often dissapointing because it emphasizes
    the jaggy edges. If you can edit to make the background color match that
    generally works better.
    Paul Furman, Feb 13, 2004
    #2
    1. Advertising

  3. Alfred Lorona

    Malcolm Guest

    > I have a line drawn cartoon which I wish to put on a web page. Photo Shop
    > saves in GIF89a format which renders it transparent. I do not want the
    > colored background to show through the cartoon . How do I instruct html

    to
    > render the background white or non-transparent?


    In your imaging software, set the transparent setting to none (or no
    transparency) when you save the cartoon.

    Malcolm
    Malcolm, Feb 13, 2004
    #3
  4. Alfred Lorona

    rf Guest

    "Alfred Lorona" <> wrote in message
    news:c0hmc7$167mqo$-berlin.de...
    > I have a line drawn cartoon which I wish to put on a web page. Photo Shop
    > saves in GIF89a format which renders it transparent. I do not want the
    > colored background to show through the cartoon . How do I instruct html

    to
    > render the background white or non-transparent?


    You don't. You instruct your graphics program to not create a transparent
    gif.

    Cheers
    Richard.
    rf, Feb 13, 2004
    #4
  5. Alfred Lorona wrote:

    > I have a line drawn cartoon which I wish to put on a web page. Photo Shop
    > saves in GIF89a format which renders it transparent. I do not want the
    > colored background to show through the cartoon . How do I instruct html to
    > render the background white or non-transparent?


    This should work:

    <img src="tree.gif" height="120" width="80" alt="AcmeCo"
    title="Corporate logo (an oak tree)"
    style="background:white;color:black;">

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Feb 13, 2004
    #5
  6. Alfred Lorona

    rf Guest

    "Toby A Inkster" <> wrote in message
    news:p...
    > Alfred Lorona wrote:
    >
    > > I have a line drawn cartoon which I wish to put on a web page. Photo

    Shop
    > > saves in GIF89a format which renders it transparent. I do not want the
    > > colored background to show through the cartoon . How do I instruct html

    to
    > > render the background white or non-transparent?

    >
    > This should work:
    >
    > <img src="tree.gif" height="120" width="80" alt="AcmeCo"
    > title="Corporate logo (an oak tree)"
    > style="background:white;color:black;">


    Dammit Toby, you are not supposed to think so far outside the nine dots!

    http://users.bigpond.net.au/rf/foot.html

    Cheers
    Richard.
    rf, Feb 13, 2004
    #6
  7. Alfred Lorona

    Paul Furman Guest

    Toby A Inkster wrote:
    >
    > This should work:
    >
    > <img src="tree.gif" ...
    > style="background:white;color:black;">


    Does that actually set the foreground & background of a b&w bitmap gif?
    Paul Furman, Feb 13, 2004
    #7
  8. Alfred Lorona

    Mitja Guest

    "Paul Furman" <> wrote in message
    news:...
    > Toby A Inkster wrote:
    > >
    > > This should work:
    > >
    > > <img src="tree.gif" ...
    > > style="background:white;color:black;">

    >
    > Does that actually set the foreground & background of a b&w bitmap gif?
    >


    I don't think color:black is really neccessary. HTML/CSS is not a tool for
    changing images themselves (although MS doesn't seem to think so -
    http://www.netspade.com/articles/css/filters.xml). All background:white does
    is set a white BACKground, which has nothing to do with the image itself, it
    just shows through the transparent areas (which retain their transparency).

    Mitja
    Mitja, Feb 13, 2004
    #8
  9. In article <c0hmc7$167mqo$-berlin.de>,
    "Alfred Lorona" <> wrote:

    > I have a line drawn cartoon which I wish to put on a web page. Photo Shop
    > saves in GIF89a format which renders it transparent. I do not want the
    > colored background to show through the cartoon . How do I instruct html to
    > render the background white or non-transparent?
    >
    > Thanks, AL
    >
    >


    It would be better to set the GIF to not have transparancy, Photoshop
    can do this but you just need to use it properly.

    --
    | Andrew Glasgow <amg39(at)cornell.edu> |
    | "The Earth is degenerating these days. Bribery and corruption abound. |
    | Children no longer mind their parents ... and it is evident that the end of |
    | the world is fast approaching." -- Assyrian stone tablet, c.2800bc |
    Andrew Glasgow, Feb 14, 2004
    #9
  10. Toby A Inkster, Feb 14, 2004
    #10
  11. Mitja wrote:

    > "Paul Furman" <> wrote in message
    > news:...
    >> Toby A Inkster wrote:
    >>>
    >>> This should work:
    >>>
    >>> <img src="tree.gif" ...
    >>> style="background:white;color:black;">

    >>
    >> Does that actually set the foreground & background of a b&w bitmap gif?

    >
    > I don't think color:black is really neccessary.


    The "color:black" is for the alt text if the image fails to load for
    whatever reason.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Feb 14, 2004
    #11
  12. Toby A Inkster wrote:

    > Mitja wrote:
    >
    >
    >>"Paul Furman" <> wrote in message
    >>news:...
    >>
    >>>Toby A Inkster wrote:
    >>>
    >>>>This should work:
    >>>>
    >>>><img src="tree.gif" ...
    >>>>style="background:white;color:black;">
    >>>
    >>>Does that actually set the foreground & background of a b&w bitmap gif?

    >>
    >>I don't think color:black is really neccessary.

    >
    >
    > The "color:black" is for the alt text if the image fails to load for
    > whatever reason.


    shouldn't that be in Hex anyway? I thought "red" or "black" and whatnot
    were phased out?
    Weyoun the Dancing Borg, Feb 14, 2004
    #12
  13. Toby A Inkster, Feb 14, 2004
    #13
  14. Alfred Lorona

    Steve Pugh Guest

    Weyoun the Dancing Borg <> wrote:
    >Toby A Inkster wrote:
    >>
    >> The "color:black" is for the alt text if the image fails to load for
    >> whatever reason.

    >
    >shouldn't that be in Hex anyway? I thought "red" or "black" and whatnot
    >were phased out?


    Not at all. The 16 colours specified in HTMl 4 are referenced by CSS2,
    (CSS2.1 adds a 17th - orange).

    The use of any colour in HTML is, of course, deprecated - and absent
    entirely from XHTML 1.1 - but they're still totally fine if used in
    CSS.

    http://www.w3.org/TR/html401/types.html#idx-color
    http://www.w3.org/TR/CSS2/syndata.html#value-def-color

    Any colour keywords other than those 16 (or 17) is problematic and
    best avoided.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Feb 14, 2004
    #14
  15. Alfred Lorona

    Eric Bohlman Guest

    Eric Bohlman, Feb 14, 2004
    #15
  16. Toby A Inkster wrote:
    > Weyoun the Dancing Borg wrote:
    >
    >> shouldn't that be in Hex anyway? I thought "red" or "black" and
    >> whatnot were phased out?

    >
    > Certainly not. There are 16 colour keywords defined in HTML 4:
    > http://www.w3.org/TR/html401/types.html#h-6.5


    Yes. And CSS2.1 (if it becomes a recommendation) will add number 17.
    http://www.w3.org/TR/CSS21/syndata.html#color-units

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
    Barry Pearson, Feb 14, 2004
    #16
  17. Thanks, people. Will try your suggestions. AL
    Alfred Lorona, Feb 15, 2004
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Minhua Fu

    How to draw a transparent gif in web

    Minhua Fu, Dec 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,017
    George Ter-Saakov
    Dec 30, 2003
  2. =?Utf-8?B?Um9iZXJ0?=
    Replies:
    0
    Views:
    434
    =?Utf-8?B?Um9iZXJ0?=
    Apr 6, 2004
  3. tshad

    Transparent Gif not working in IE

    tshad, Oct 29, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    6,369
    =?Utf-8?B?T2xkZ3V5Mg==?=
    Jan 26, 2005
  4. =?Utf-8?B?TWVrZW4=?=

    Resize transparent gif images

    =?Utf-8?B?TWVrZW4=?=, Jul 20, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    588
    =?Utf-8?B?TWVrZW4=?=
    Jul 20, 2005
  5. Replies:
    0
    Views:
    1,103
Loading...

Share This Page