some research
http://www.jabber.org/jeps/jep-0153.html vCard-Based Avatars (Experimental)[/b]
The image SHOULD use less than eight kilobytes (8k) of data; this restriction is to be enforced by the publishing client. (Spark 1.1.4 does allow 16k images)
The image height and width SHOULD be between thirty-two (32) and ninety-six (96) pixels; the recommended size is sixty-four (64) pixels high and sixty-four (64) pixels wide.
The image SHOULD be square.
The image content type SHOULD be image/gif, image/jpeg, or image/png; support for the “image/png” content type is REQUIRED, support for the “image/gif” and “image/jpeg” content types is RECOMMENDED, and support for any other content type is OPTIONAL.
The image data MUST conform to the base64Binary datatype and thus be encoded in accordance with Section 6.8 of RFC 2045 , which recommends that base64 data should have lines limited to at most 76 characters in length. However, any whitespace characters (e.g., ‘’\r’’ and ‘’\n’’) MUST be ignored.
http://www.jabber.org/jeps/jep-0008.html IQ-Based Avatars (Experimental)[/b]
the image height and width must be between thirty-two (32) and sixty-four (64) pixels.
The suggested size is sixty-four (64) pixels high and sixty-four (64) pixels wide .
Images should be square, but this is not required.
Images should be in GIF, JPEG, or PNG format, although it is possible that in future revisions of this spec more formats will be allowed.
Finally, images must use less than eight (8) kilobytes of data.
http://www.jabber.org/jeps/jep-0084.html User Avatar (Experimental)[/b]
Certain restrictions are placed upon the image. First, the image height and width SHOULD be between thirty-two (32) and ninety-six (96) pixels. The suggested size is sixty-four (64) pixels high and sixty-four (64) pixels wide. Images SHOULD be square, but this is not required. Finally, images SHOULD use less than eight (8) kilobytes of data.
The receiving application SHOULD NOT scale up an image when displaying it.
==> So resizing to 96x96 pixel could be done if the image is too large before calculating the size to store it. And to meet the suggested[/i] 8k size the client may try to convert it to png, gif, jpg100%, jpg75% and jpeg 50% and choose the smallest one with the best quality.