SC_User_SetImageFromData()
Sets the user's image.
Synopsis:
#include <scoreloop/sc_user.h>
SC_Error_t SC_User_SetImageFromData(SC_User_h self, const unsigned char *imageData, unsigned int imageDataLen, const char *imageMime)
Arguments:
- self
-
An opaque handle for the current SC_User instance.
- imageData
-
Binary data containing new user's image in JPG or PNG format.
- imageDataLen
-
The length of binary data
- imageMime
-
Mime type of the image. Currently "image/png" and "image/jpeg" are supported.
Library:
libscoreloopcoreDescription:
This method is used to set the image of the user.
After calling this method, the previous image becomes outdated, and GetImageUrl returns NULL. The image is sent to the server after a UserController calls UpdateUser, and then the image URL containing the new image will become available.
Returns:
SC_Error_t A return code (a value of SC_OK indicates success, any other value indicates an error).