aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorlns <matzeton@googlemail.com>2022-05-06 11:38:26 +0200
committerlns <matzeton@googlemail.com>2022-05-06 11:38:26 +0200
commit3b4947b8b4a5c6ec9421ade5cc759ca3b947bd67 (patch)
tree8ac0c497f65dee15cf8d0796acc640d0d0e27092 /main.cpp
parent5e7d06b220d21e03d01334c9f445a8407916bb0d (diff)
png supportHEADmaster
Signed-off-by: lns <matzeton@googlemail.com>
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");
}