Commit e8f48e4b authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

call: send compressed avatar

Load image with default format because on macOS loadFromData failed
when format is selected.

Change-Id: I889ed40fd90f218efb3dd872259bcd2993ef8786
parent 70255cb4
......@@ -151,10 +151,14 @@ QString
compressedAvatar(const QString& image)
{
QImage qimage;
#ifdef ENABLE_LIBWRAP
auto ret = qimage.loadFromData(QByteArray::fromBase64(image.toUtf8()), 0);
#else
// Avoid to use all formats. Some seems bugguy, like libpbf, asking
// for a QGuiApplication for QFontDatabase
auto ret = qimage.loadFromData(QByteArray::fromBase64(image.toUtf8()), "JPEG");
if (!ret) ret = qimage.loadFromData(QByteArray::fromBase64(image.toUtf8()), "PNG");
#endif
if (!ret) {
qDebug() << "vCard image loading failed";
return image;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment