[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/calligra/2.9] krita/plugins/formats/png: BUG:348099 Better error message in PNG export
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2015-08-18 13:17:52
Message-ID: E1ZRgm0-0006Wg-Id () scm ! kde ! org
[Download RAW message or body]

Git commit 79f18b8c0acd395705c5f153befaf9b095e84df9 by Boudewijn Rempt.
Committed on 18/08/2015 at 13:17.
Pushed by rempt into branch 'calligra/2.9'.

BUG:348099 Better error message in PNG export

M  +3    -7    krita/plugins/formats/png/kis_png_export.cc

http://commits.kde.org/calligra/79f18b8c0acd395705c5f153befaf9b095e84df9

diff --git a/krita/plugins/formats/png/kis_png_export.cc \
b/krita/plugins/formats/png/kis_png_export.cc index 987a25a..f678ed0 100644
--- a/krita/plugins/formats/png/kis_png_export.cc
+++ b/krita/plugins/formats/png/kis_png_export.cc
@@ -102,14 +102,10 @@ KisImportExportFilter::ConversionStatus \
                KisPNGExport::convert(const QByteArray&
     KisPaintLayerSP l = new KisPaintLayer(image, "projection", OPACITY_OPAQUE_U8, \
pd);  image->unlock();
 
-    QStringList supportedColorModelIds;
-    supportedColorModelIds << RGBAColorModelID.id() << GrayAColorModelID.id() << \
                GrayColorModelID.id();
-    QStringList supportedColorDepthIds;
-    supportedColorDepthIds << Integer8BitsColorDepthID.id() << \
                Integer16BitsColorDepthID.id();
-    if (!supportedColorModelIds.contains(pd->colorSpace()->colorModelId().id()) ||
-            !supportedColorDepthIds.contains(pd->colorSpace()->colorDepthId().id())) \
{ +
+    if (!KisPNGConverter::isColorSpaceSupported(pd->colorSpace())) {
         if (!m_chain->manager()->getBatchMode()) {
-            QMessageBox::critical(0, i18nc("@title:window", "Krita PNG Export"), \
i18n("Cannot export images in this colorspace or channel depth to PNG")); +           \
QMessageBox::critical(0, i18nc("@title:window", "Krita PNG Export"), i18n("You can \
only save grayscale and RGB images to PNG. Convert your image before exporting to \
PNG."));  }
         return KisImportExportFilter::UsageError;
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic