Commit db8a55bc authored by Boudewijn Rempt's avatar Boudewijn Rempt

Save the thumbnail to a bytearray so it can be stored in a BLOB

parent 8fefe147
......@@ -362,7 +362,14 @@ bool KisResourceCacheDb::addResource(KisResourceStorageSP storage, QDateTime tim
q.bindValue(":name", resource->name());
q.bindValue(":filename", resource->filename());
q.bindValue(":tooltip", i18n(resource->name().toUtf8()));
q.bindValue(":thumbnail", resource->image());
QByteArray ba;
QBuffer buf(&ba);
buf.open(QBuffer::WriteOnly);
resource->image().save(&buf, "PNG");
buf.close();
q.bindValue(":thumbnail", ba);
q.bindValue(":status", 1);
r = q.exec();
......
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