Avatar resizing to 48 x 48 px?

Hi,

I did not find an option to display the original size of the uploaded avatar. I’'m quite sure that the image will not be resized on client side before uploading or before storing it to the database so the original image which may have a high resolution will always be transferred. Anyhow if I look at the database then I get the impression that my .png image was converted to .jpeg ( … ). I wonder if this is really the case.

How do I display the original image within Spark?

Maybe there is a way (or will be in a future version) to force Spark to downsize the image to 48x48 before storing it?

I could also post this thread in the Wifi forum to ask for a server option to limit the avatar size by either rejecting larger images or by resizing them. But I’'m not yet sure which option (or both) is the better one.

LG

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.

Derek filed SPARK-294 to be fixed in the 1.5 timeframe.