[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/calligra/2.9] krita: Added comments that shortly explains the workarounds reasoning.
From: Stefano Bonicatti <smjert () gmail ! com>
Date: 2015-02-22 17:29:33
Message-ID: E1YPaLV-000298-7i () scm ! kde ! org
[Download RAW message or body]
Git commit 489c34b4e653d71954b288b9e07f81f56e374ce4 by Stefano Bonicatti.
Committed on 22/02/2015 at 17:26.
Pushed by stefanobonicatti into branch 'calligra/2.9'.
Added comments that shortly explains the workarounds reasoning.
M +2 -0 krita/libbrush/kis_png_brush.cpp
M +4 -0 krita/plugins/extensions/resourcemanager/resourcebundle.cpp
http://commits.kde.org/calligra/489c34b4e653d71954b288b9e07f81f56e374ce4
diff --git a/krita/libbrush/kis_png_brush.cpp b/krita/libbrush/kis_png_brush.cpp
index 4cde8f1..7085d45 100644
--- a/krita/libbrush/kis_png_brush.cpp
+++ b/krita/libbrush/kis_png_brush.cpp
@@ -49,6 +49,8 @@ bool KisPngBrush::load()
bool KisPngBrush::loadFromDevice(QIODevice *dev)
{
+ // Workaround for some OS (Debian, Ubuntu), where loading directly from the \
QIODevice + // fails with "libpng error: IDAT: CRC error"
QByteArray data = dev->readAll();
QBuffer buf(&data);
QImageReader reader(&buf, "PNG");
diff --git a/krita/plugins/extensions/resourcemanager/resourcebundle.cpp \
b/krita/plugins/extensions/resourcemanager/resourcebundle.cpp index d161e75..e5aacad \
100644
--- a/krita/plugins/extensions/resourcemanager/resourcebundle.cpp
+++ b/krita/plugins/extensions/resourcemanager/resourcebundle.cpp
@@ -183,6 +183,8 @@ bool ResourceBundle::load()
}
if (resourceStore->open("preview.png")) {
+ // Workaround for some OS (Debian, Ubuntu), where loading directly from \
the QIODevice + // fails with "libpng error: IDAT: CRC error"
QByteArray data = resourceStore->device()->readAll();
QBuffer buffer(&data);
m_thumbnail.load(&buffer, "PNG");
@@ -693,6 +695,8 @@ bool ResourceBundle::install()
qWarning() << "Failed to open" << ref.resourcePath << "from \
bundle" << filename(); continue;
}
+ // Workaround for some OS (Debian, Ubuntu), where loading directly \
from the QIODevice + // fails with "libpng error: IDAT: CRC error"
QByteArray data = resourceStore->device()->readAll();
QBuffer buffer(&data);
if (!res->loadFromDevice(&buffer)) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic