attempt to use a cache for user-defined avatars. Should reduce memory footprint. to be tested

This commit is contained in:
csoler 2019-06-03 23:52:29 +02:00
parent 807bbedd5a
commit e66fb923fb
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
25 changed files with 163 additions and 113 deletions

View file

@ -25,6 +25,7 @@
#include "rshare.h"
#include "PostedItem.h"
#include "gui/feeds/FeedHolder.h"
#include "gui/gxs/GxsIdDetails.h"
#include "util/misc.h"
#include "ui_PostedItem.h"
@ -255,7 +256,7 @@ void PostedItem::fill()
if(mPost.mImage.mData != NULL)
{
QPixmap pixmap;
pixmap.loadFromData(mPost.mImage.mData, mPost.mImage.mSize, "PNG");
GxsIdDetails::loadPixmapFromData(mPost.mImage.mData, mPost.mImage.mSize, pixmap);
// Wiping data - as its been passed to thumbnail.
QPixmap sqpixmap = pixmap.scaled(desired_width,desired_height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);