[JDEV] Buddy Icon (Avatar) Proposal

Jens Alfke jens at mac.com
Thu Aug 30 18:37:28 CDT 2001


On Thursday, August 30, 2001, at 03:52 PM, Julian Missig wrote:

> First, the requirements on the image.  The image should be a 50 x 50 
> image in either GIF, PNG, or MNG format, as well as under 8k of data.  
> MNG support is optional.

(1) 50x50 seems an unusual choice. Mac and Windows use 32x32 heavily 
(what do kde / GNOME use?), NeXT used 48x48, and Mac OS X also supports 
64x64 and 128x128. (Apple's OS X Mail client displays a 64x64 icon of 
the sender of an email message, and my Jabber client uses 32x32.) It 
would be better to have a size that was a power of two so that it would 
scale more smoothly to 32x32. OS X has built in bicubic scaling so it 
won't look too bad, but without this the icon will look really jaggy at 
32x32 or 64x64.
(2) Why disallow JPEG? It has by far the best compression. (A 64x64 face 
image usually compresses to under 2k.) It's only drawback is the lack of 
alpha channel.
(3) What is MNG? I've never heard of this before.

> The actual icon request is in a new IQ namespace:

Why not use the server-side generic storage facility instead? The get 
sequence would be just as you described, except the namespace would be 
something that didn't start with "jabber". The owner of the image would 
use a "set" on his/her JID with the same namespace. This way the server 
would automatically store the image.

This would reduce network traffic for the owner of the icon (imagine the 
poor guy on a 28.8 modem with 100 buddies who all request his new icon 
at once) and allows an offline user's icon to be retrieved.

>         <data type='gif|png|mng'>
>           Base64 Encoded Data Here
>         </data>

It's not really necessary to declare the type of the data, as the 
standard graphics formats are all self-describing. But if you do provide 
it, please use a real MIME type instead of making up a name.

--Jens




More information about the JDev mailing list