[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/filters/krita/magick
From: Boudewijn Rempt <boud () valdyas ! org>
Date: 2006-03-02 10:55:46
Message-ID: 1141296946.915298.6140.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 515001 by rempt:
Saving as bmp works now _if_ you use the suffix .bmp3. I've asked on the ImageMagick
mailing list how to make it work with plain .bmp.
M +12 -4 kis_image_magick_converter.cc
--- trunk/koffice/filters/krita/magick/kis_image_magick_converter.cc #515000:515001
@@ -24,6 +24,7 @@
#include <magick/api.h>
#include <qfile.h>
+#include <qfileinfo.h>
#include <qstring.h>
#include <kdeversion.h>
@@ -697,14 +698,18 @@
image -> matte = true;
#endif
-
Q_INT32 y, height, width;
height = img -> height();
width = img -> width();
- bool alpha = true;//layer -> hasAlpha();
-
+ bool alpha = true;
+ if (QFileInfo(QFile::encodeName(uri.path())).extension(false).upper() == "BMP") {
+ alpha = false;
+ qstrncpy(ii->magick, "BMP2", MaxTextExtent - 1);
+ kdDebug() << ii->magick << "|" << endl;
+ }
+
for (y = 0; y < height; y++) {
// Allocate pixels for this scanline
@@ -719,7 +724,10 @@
}
KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, y, width, false);
- SetImageType(image, TrueColorMatteType);
+ if (alpha)
+ SetImageType(image, TrueColorMatteType);
+ else
+ SetImageType(image, TrueColorType);
if (image->colorspace== CMYKColorspace) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic