• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Clear image questions

Dean

Well-known member
#1
Is a 'clear image' an image that does nothing and could be used as a place holder to retain certain formatting as if a real image is there?

Can a clear image be made with jpg or gif?

?
 

Shadab

Well-known member
#3
The clear images (usually named clear.gif, spacer.gif) were mainly used in table based layouts to fix alignments and maybe to prevent the empty cells from collapsing. But I haven't seen them being used much in CSS based layouts. And yes, they are just 1px by 1px transparent images.

Such an image can be made with gif (preferred) and png formats; but not jpeg, since it doesn't support transparency.
 

Dean

Well-known member
#4
Found an online gif creator program. Using the word 'transparent' instead of 'clear' was much more useful as a search term...

Is the color ffffff transparent or white in a gif?
 

Shadab

Well-known member
#5
0xffffff is white.

But I'm sure that the single pixel has no color information attached to it;
which is why it's transparent.

Haven't studied the binary representation of gif (or png, jpg) file format yet.
Still playing with the bmp since it is the easiest. :p
 

Dean

Well-known member
#6
I am experimenting with something on my existing forum. Is it possible to create a clear gif of a certain size such as 800 x 600 pixels?
 

Shadab

Well-known member
#7
Yes, you can create a fully transparent gif of any size you desire.

But a 1 x 1 pixel transparent gif scaled to any size via html (see below) would produce exactly the same result, so most of the time theres no point in creating a clear image of any other size.

HTML:
<img src="clear-1x1.gif" width="800" height="600" alt="" />