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

Fixed  Avatar Transparency

Kier

XenForo Developer
Staff member
#3
Our avatar scheme is intended to encourage the use of photos - all avatars have a border, so having transparent avatars is going to look a bit weird anyway.
 

Mike

XenForo developer
Staff member
#4
We do resizing using JPEGs across the board, so that makes transparency a problem in general. I did try PNGs, but the files were huge.
 

calorie

Active member
#5
Are you using GD or ImageMagick? Just curious.

For transparency in images, you could set the "transparent black" to a fixed color, perhaps the background color. Just an idea. ;)
 

Erik

Well-known member
#7
We do resizing using JPEGs across the board, so that makes transparency a problem in general. I did try PNGs, but the files were huge.
Isn't there a way to reduce the PNG file size? Really small PNG's (even 24bit+transparency) are entirely possible without losing quality. Were you trying 8-bit indexed or 24-bit PNG's?

Not that I'm blaming you, it's probably entirely GD's fault, but if you could maybe work a little bit harder on it... well, full-transparency uploads would be awesome. :)
 

calorie

Active member
#11
FYI, I've updated my avatar to have a white background, but the first post herein also has an attached file showing the transparency as black on the thumbnail.
 
F

Floris

Guest
#16
GIF to me is like IE6, dead.

PNG ftw. Just upgrade the browser or accept it's not showing perfect. Times change. Legacy support should only go that far.
 

Enigma

Well-known member
#17
No, different image formats are suitable for different applications. Use the right tool for the job instead of just saying X is always superior. For example, PNG is lossless and performs well for many applications. JPEG is lossy, but performs much better in terms of filesize than PNG for photographic images, while maintaining the same visual quality in terms of what the naked human eye can detect.
 
#18
To be clear, is this a limitation of the forum, or just the fact that the server is using GD? My forum uses GD and I do not have this problem.

Just as a test I changed my avatar to a 200x200 PNG and it looks like someone turned off the lights. :(

If it is a forum limitation than that is a instant deal breaker, considering transparent avatars (and images in general) have moderate popularity IMO and about 90% of general forum users do not use their own photo.

GIF to me is like IE6, dead.

PNG ftw. Just upgrade the browser or accept it's not showing perfect. Times change. Legacy support should only go that far.
Floris, I like you, I really do. :) But telling people to upgrade isn't solving the problem. GIF isn't dead and saying that it is, is well, ignorant. I use a modern browser on a modern operation system on modern hardware and having my avatar turn into a black box would still be disappointing (which it is). BTW: What does a browser have to do with this thread at all? If anything you should argue that filesize isn't a problem since modern computers and internet connections are fast enough to handle a transparent PNG avatar ;)
 

Erik

Well-known member
#19
We do resizing using JPEGs across the board, so that makes transparency a problem in general. I did try PNGs, but the files were huge.
Mike, as I was doing my signature badge I looked up some of the functions for GD, and imagepng() supports both the use of PNG compression via a quality setting from 0-9, and the use of PNG filters to reduce the filesize even further. Did you try using these features when you said that "the files were huge"? :)
 

Cezz

Well-known member
#20
Mike, as I was doing my signature badge I looked up some of the functions for GD, and imagepng() supports both the use of PNG compression via a quality setting from 0-9, and the use of PNG filters to reduce the filesize even further. Did you try using these features when you said that "the files were huge"? :)
Have to agree here, with the use of quality and compression settings it would be possible to create small image that also has transparency.