2022-04-10 00:31:10 +00:00
|
|
|
accessing
|
|
|
|
avatarPicture
|
2022-04-10 04:09:23 +00:00
|
|
|
| response tempImage |
|
2022-04-10 00:31:10 +00:00
|
|
|
response := ZnClient new url: (self profileImageUrl); get; response.
|
|
|
|
response contentType = ZnMimeType imageJpeg
|
2022-05-14 22:45:58 +00:00
|
|
|
ifTrue: [ tempImage := (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
|
2022-04-10 00:31:10 +00:00
|
|
|
response contentType = ZnMimeType imagePng
|
2022-05-14 22:45:58 +00:00
|
|
|
ifTrue: [ tempImage := (PNGReadWriter gtFromBuffer: response contents) asElement ].
|
2022-04-10 04:09:23 +00:00
|
|
|
tempImage on: Error do: [ ^ GtABContact new avatar ].
|
|
|
|
^ tempImage value asElement .
|