aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index c6af504..141e1c9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -18,6 +18,13 @@ int main(int argc, char **argv) {
return 1;
}
+#if 0
+ if (gAPI.AvatarToFile("/tmp/" + gAPI.GetUsername() + ".whatever") == false)
+ {
+ return 1;
+ }
+#endif
+
{
std::vector<unsigned char> avatar;
@@ -25,7 +32,9 @@ int main(int argc, char **argv) {
return 1;
}
- iM.SetJpegFromBuffer(avatar);
+ if (iM.SetImageFromBuffer(avatar) == false) {
+ return 1;
+ }
iM.SaveToFile(gAPI.GetUsername() + ".jpg");
}