# Transparency in avatars



## Jace (Mar 6, 2009)

I made a thread about this before but I dont think anyone answered me.  Are you guys ever going to fix the avatars so pngs and gifs are actually transparent instead of having black backgrounds?


----------



## yak (Mar 6, 2009)

I thought the answer was given numerous times?
Anyway, 
* FA uses gifs for avatars. 
* f you're uploading a non-gif image FA would try to convert it to one. 
* The conversion makes any semi-but-non-100% transparency png regions pure black, it's just how it works.
* PNG avatars, even 8bit ones, even ran through pngcrush, have higher file size then their .gif equivalents, so it's unlikely that the native format  would be changed in the current version of FA.

Taking in account the info above, the safest way to deal with transparency would be to make your own gif version of the avatar and upload that, preventing FA from trying to do anything on it's own.


----------



## Jace (Mar 7, 2009)

Ah okay, thank you Yak.  Sorry I didn't see this answer before!


----------



## Quiet269 (Mar 7, 2009)

Why not just allow any image file type and have it check file size and image size?

I mean... what does it matter if a PNG is 10kb and a GIF is 9kb if the limit is 25KB? Besides PNGs look a LOT better as they allow the use of more than 256 colors... and full transparency... so it will look good on any template...

Besides... the Forums allow PNG :\


----------



## Freehaven (Mar 8, 2009)

Not all versions of Internet Explorer support transparent PNGs, and like it or not, IE (all versions) is still the most-used browser out there.  Therefore, GIFs are the better solution for transparency in avatars.  If people really have that much of an issue converting a PNG to a GIF...then that's just sad, really.


----------



## Quiet269 (Mar 9, 2009)

That argument is stupid.


----------



## krisCrash (Mar 9, 2009)

Will the avatar ever go on anything but that same light blue colour? If not, I don't really see what transparency is even needed for? And if it's a matter of two similar background colours, I can show you some tricks to make it look antialiased transparent on both.

Yeah, the conversion irritated me, but I'll deal.


----------



## Quiet269 (Mar 9, 2009)

The Main site has a Background color of #2E3B41 the forums use #FDFEFE there is no way you can get an anti-aliased look on both. They are totally different colors.

The forums allow PNG, why doesn't the main site?


----------



## mottled.kitten (Mar 9, 2009)

Also, a lot of folks use the "dark" FA look, not the light one. In my images, I just color the background the dark color so it looks transparent. *shrug*


----------



## Quiet269 (Mar 9, 2009)

That's a work around though, and if you're doing a rainbow it's not going to look that good 

the limit of GIF only makes no sense


----------



## Firehazard (Mar 10, 2009)

Freehaven said:


> Not all versions of Internet Explorer support transparent PNGs, and like it or not, IE (all versions) is still the most-used browser out there.  Therefore, GIFs are the better solution for transparency in avatars.  If people really have that much of an issue converting a PNG to a GIF...then that's just sad, really.


The thing about that, though... IE does at least recognize, read, and render the alpha channel correctly; it's just that annoying solid background they put behind it.  And really, that's not such a big issue when we're talking about avatars that only ever have solid color behind them anyway.

Compare this to the fact that actual submissions made as PNGs will wind up with awful black backgrounds and jaggedy edges in all of their shrunken-down versions.  I don't think it would be too much to ask for the transcoding algorithms to add solid backgrounds of a color that more or less goes with both skins behind PNGs and flatten them before converting to GIF and JPEG.  Surely there's an open-source algorithm out there that already does that.  (I highly doubt Alkora coded the one we have now from scratch.)


----------



## Aurali (Mar 10, 2009)

The difference is pipeline Quiet.. According to Yak.. FA already is seaming on it's edges.. If we wanna fix this.. we cut back on as much as possible.. a single K can end up as a meg in a matter of seconds with people downloading thousands of times a second..


----------



## Quiet269 (Mar 11, 2009)

The point is that the Limit is 25kb.

You're giving us 25kb to work with, you've set up your servers so that it will expect a maximum of 25 kb. If I can get a PNG to look better and stay under 25kb then what's the issue?


----------



## SnowFox (Mar 11, 2009)

There is a javascript hack that can "fix" the png transparency in internet explorer. If you attached an onload handler to every png image to call a function that does something like this:

```
[I][image object][/I].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='[I][image src][/I]',sizingMethod='scale')";
```


----------



## Aurali (Mar 11, 2009)

SnowFox said:


> There is a javascript hack that can "fix" the png transparency in internet explorer. If you attached an onload handler to every png image to call a function that does something like this:
> 
> ```
> [I][image object][/I].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='[I][image src][/I]',sizingMethod='scale')";
> ```



or.. you know.. you can ask them to upgrade?

IE7 and up supports it.

Edit: look this up

Firefox is the worlds #1 browser right now
and only 19% of the world has a browser that can't view pngs properly
http://www.w3schools.com/browsers/browsers_stats.asp


----------



## SnowFox (Mar 11, 2009)

Eli said:


> or.. you know.. you can ask them to upgrade?
> 
> IE7 and up supports it.



Oh kewl. Still hate IE though. Does IE 7 and up support position:fixed?

Wait. Who on FA uses IE?

EDIT



> W3Schools is a website for people with an interest for web technologies. These people are more interested in using alternative browsers than the average user. The average user tends to use Internet Explorer, since it comes preinstalled with Windows. Most do not seek out other browsers.



^This

I still have to consider the 95% of retards average people that use IE 6 when browsing my work's website and it makes me sad.

EDIT EDIT: I lol'd


----------



## Aurali (Mar 11, 2009)

SnowFox said:


> Oh kewl. Still hate IE though. Does IE 7 and up support position:fixed?
> 
> Wait. Who on FA uses IE?



I edited my post.. 


and yes


----------



## Arshes Nei (Mar 12, 2009)

Quiet269 said:


> The forums allow PNG, why doesn't the main site?



From the desk of the Obvious - this is not the same code. Notice *VBULLETIN* on the bottom of the forums?


----------



## net-cat (Mar 12, 2009)

Freehaven said:


> Not all versions of Internet Explorer support transparent PNGs, and like it or not, IE (all versions) is still the most-used browser out there.


IE6 is only about 3% of our user base.

Also, the next version of FA will probably support PNG avatars. And will not support IE6.


----------



## krisCrash (Mar 12, 2009)

Quiet269 said:


> The Main site has a Background color of #2E3B41 the forums use #FDFEFE there is no way you can get an anti-aliased look on both. They are totally different colors.
> 
> The forums allow PNG, why doesn't the main site?



Not even that, but the forum one is displayed on a gradient.

There is probably no way you would use the same file anyway, since you are allowed a larger avatar on the forum, hmm?

Those two colours are very similar though, I am not saying to put it on a solid background, but fade it to a similar one, then go transparent.



mottled.kitten said:


> Also, a lot of folks use the "dark" FA look, not the light one. In my images, I just color the background the dark color so it looks transparent. *shrug*



Ah right, I hadn't thought about the Dark look.


----------



## yak (Mar 13, 2009)

Quiet269 said:


> The point is that the Limit is 25kb.
> 
> You're giving us 25kb to work with, you've set up your servers so that it will expect a maximum of 25 kb. If I can get a PNG to look better and stay under 25kb then what's the issue?



From a purely theoretical stand point - gifs are smaller then pngs in general. 
Both types of avatars would fit below the limit, but the gif version would be smaller. That fact alone, times a "one" with lots of zeroes behind it that represents the number of avatars shown per hour, would amount to quite a lot of savings (or waste) in bandwidth better spent on having higher resolution submission images rather then higher quality avatars.


----------



## Quiet269 (Mar 13, 2009)

But... The Limit is 25kb... This is what I don't get.

I can have a 25kb GIF but not a 5KB PNG because the PNG is "Bigger" :|


----------



## SnowFox (Mar 13, 2009)

I think yak's just saying that since in general gifs are smaller most people won't be using the full 25kb available, but if pngs were allowed the average avatar size would be larger.


----------



## Quiet269 (Mar 13, 2009)

That is not true lol... I can fill up 25kb very quickly... it's really not hard...

if anything I can get a larger file size with GIFS than PNGs as I can animate Gifs, I cannot do that with PNGs... so while PNGs will have a set max size due to the fact that they simply cannot add additional frames... I can make a 4MB Gif rather easily.

I mean... This is 2.4MB GIF 





and that's... really a rather short animation...


----------



## SnowFox (Mar 13, 2009)

Quiet269 said:


> That is not true lol... I can fill up 25kb very quickly... it's really not hard...
> 
> if anything I can get a larger file size with GIFS than PNGs as I can animate Gifs, I cannot do that with PNGs... so while PNGs will have a set max size due to the fact that they simply cannot add additional frames... I can make a 4MB Gif rather easily.
> 
> ...



Well I take your point, but


----------



## Quiet269 (Mar 13, 2009)

Ahh, Animated PNGs.... while completely kick ass... are not a standard format yet so I do not factor them into my consideration 

Hell I don't think any version of IE supports them, or Anything below FF3 or the latest crome/opera/whatever does


----------



## Firehazard (Mar 14, 2009)

Quiet269 said:


> Ahh, Animated PNGs.... while completely kick ass... are not a standard format yet so I do not factor them into my consideration
> 
> Hell I don't think any version of IE supports them, or Anything below FF3 or the latest crome/opera/whatever does



I don't think animated PNG will _ever_ become a standard, sadly; even the people in charge of the official PNG format don't want it:



			
				Wikipedia said:
			
		

> The PNG group officially rejected APNG as an official extension on April 20, 2007. There have been several subsequent proposals for a simple animated graphics format based on PNG using several different approaches... APNG uses a technically feasible solution for storing any frames except the first, but the majority of the PNG group thinks this conflicts with the purpose of the PNG format â€“ which is to store a single image.


----------



## Quiet269 (Mar 14, 2009)

Yeah.

I hope that they change their mind or the APNG people just get their own name going. If they can.

I'd love to see APNG replacing Gifs


----------



## Aurali (Mar 14, 2009)

Doesn't Adobe own PNG now?


----------



## SnowFox (Mar 14, 2009)

Wouldn't be surprised, they own everything else.

inb4 Adobe Affinity Forums


----------

