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_brus= h.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 fro= m the QIODevice + // fails with "libpng error: IDAT: CRC error" QByteArray data =3D 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 dire= ctly from the QIODevice + // fails with "libpng error: IDAT: CRC error" QByteArray data =3D 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 =3D resourceStore->device()->readAll(); QBuffer buffer(&data); if (!res->loadFromDevice(&buffer)) {