diff options
author | dubslow <bunslow@gmail.com> | 2014-09-27 17:49:20 -0500 |
---|---|---|
committer | dubslow <bunslow@gmail.com> | 2014-09-27 17:49:20 -0500 |
commit | 6f4ab49f5c2a33aab00bdb9e80dfe51624089899 (patch) | |
tree | 34999b4b4963222094c752c81ac1264729ca8580 | |
parent | d2640103649b4513d2fc4d7bbb291fa941023ebf (diff) |
Modify avatar recommendations
-rw-r--r-- | docs/Avatars.md | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/docs/Avatars.md b/docs/Avatars.md index fee401c0..2a34abbe 100644 --- a/docs/Avatars.md +++ b/docs/Avatars.md | |||
@@ -241,18 +241,22 @@ already downloaded by other clients can be reused. | |||
241 | 241 | ||
242 | Given the Tox data directory described in STS Draft v0.1.0: | 242 | Given the Tox data directory described in STS Draft v0.1.0: |
243 | 243 | ||
244 | - The user avatar is stored in a file named "avatar.png". As more formats | 244 | - Avatars are stored in a directory called "avatars" and named |
245 | may be used in the future, another extensions are reserved and clients | 245 | as "xxxxx.png", where "xxxxx" is the complete client id (but not friend |
246 | should keep just one file named "avatar.*", with the data of the last | 246 | address!) encoded as an uppercase hexadecimal string and "png" is the |
247 | avatar set by the user. If the user have no avatar, no such files should | 247 | extension for the PNG avatar. As new image formats may be used in the |
248 | be kept in the data directory; | 248 | future, clients should ensure no other file "xxxxx.*" exists. No file |
249 | 249 | should be kept for an user who have no avatar. | |
250 | - Friends avatars are stored in a directory called "avatars" and named | 250 | |
251 | as "xxxxx.png", where "xxxxx" is the complete client id encoded as an | 251 | - The client's own avatar is not special and is stored like any other. This |
252 | uppercase hexadecimal string and "png" is the extension for the PNG | 252 | is partially for simplicity, and partially in anticipation of profiles. |
253 | avatar. As new image formats may be used in the future, clients should | 253 | |
254 | ensure no other file "xxxxx.*" exists. No file should be kept for an user | 254 | - The avatar that is stored may be scaled and resized as required by the |
255 | who have no avatar. | 255 | client; we should develop a common scaling and resizing method. |
256 | |||
257 | - The hash, as calculated by toxcore (rather than the hash of the scaled | ||
258 | image), should be saved in "avatars/xxxxx.hash" where "xxxxx" means the | ||
259 | same thing as for avatars. (The filename is longer than the file :) ) | ||
256 | 260 | ||
257 | **To be discussed:** User keys are usually presented in Tox clients as | 261 | **To be discussed:** User keys are usually presented in Tox clients as |
258 | upper case strings, but lower case file names are more usual. | 262 | upper case strings, but lower case file names are more usual. |
@@ -262,13 +266,14 @@ Example for Linux and other Unix systems, assuming an user called "gildor": | |||
262 | 266 | ||
263 | Tox data directory: /home/gildor/.config/tox/ | 267 | Tox data directory: /home/gildor/.config/tox/ |
264 | Tox data file: /home/gildor/.config/tox/data | 268 | Tox data file: /home/gildor/.config/tox/data |
265 | Gildor's avatar: /home/gildor/.config/tox/avatar.png | ||
266 | Avatar data dir: /home/gildor/.config/tox/avatars/ | 269 | Avatar data dir: /home/gildor/.config/tox/avatars/ |
270 | Gildor's avatar: /home/gildor/.config/tox/avatars/E5809EEF5F11AB29B9BDF543C05B58DDF454AB9CA176C235C7699FDC2757DC33.png | ||
267 | Elrond's avatar: /home/gildor/.config/tox/avatars/43656C65627269616E20646F6E277420546F782E426164206D656D6F72696573.png | 271 | Elrond's avatar: /home/gildor/.config/tox/avatars/43656C65627269616E20646F6E277420546F782E426164206D656D6F72696573.png |
272 | Elrond's hash: /home/gildor/.config/tox/avatars/43656C65627269616E20646F6E277420546F782E426164206D656D6F72696573.hash | ||
268 | Elladan's avatar: /home/gildor/.config/tox/avatars/49486174655768656E48756D616E735468696E6B49416D4D7942726F74686572.png | 273 | Elladan's avatar: /home/gildor/.config/tox/avatars/49486174655768656E48756D616E735468696E6B49416D4D7942726F74686572.png |
274 | Elladan's hash: /home/gildor/.config/tox/avatars/49486174655768656E48756D616E735468696E6B49416D4D7942726F74686572.hash | ||
269 | Elrohir's avatar /home/gildor/.config/tox/avatars/726568746F7242794D6D41496B6E696854736E616D75486E6568576574614849.png | 275 | Elrohir's avatar /home/gildor/.config/tox/avatars/726568746F7242794D6D41496B6E696854736E616D75486E6568576574614849.png |
270 | Arwen's avatar: /home/gildor/.config/tox/avatars/53686520746F6F6B20476C6F7266696E64656C277320706C6163652068657265.png | 276 | Elrohir's hash: /home/gildor/.config/tox/avatars/726568746F7242794D6D41496B6E696854736E616D75486E6568576574614849.hash |
271 | Lindir's avatar: /home/gildor/.config/tox/avatars/417070735772697474656E42794D6F7274616C734C6F6F6B54686553616D652E.png | ||
272 | 277 | ||
273 | This recommendation is partially implemented by "testing/test_avatars.c". | 278 | This recommendation is partially implemented by "testing/test_avatars.c". |
274 | 279 | ||