transparent GIF

A

Alfred Lorona

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
 
P

Paul Furman

Alfred said:
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.
 
M

Malcolm

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
 
R

rf

Alfred Lorona said:
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.
 
T

Toby A Inkster

Alfred said:
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;">
 
P

Paul Furman

Toby said:
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?
 
M

Mitja

Paul Furman said:
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
 
A

Andrew Glasgow

Alfred Lorona said:
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.
 
W

Weyoun the Dancing Borg

Toby said:
Mitja 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?
 
S

Steve Pugh

Weyoun the Dancing Borg said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top