[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/digikam/libs/dimg/loaders
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2009-06-04 19:37:20
Message-ID: 1244144240.705035.15379.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 977597 by cgilles:
polish
M +5 -5 pgfloader.cpp
--- trunk/extragear/graphics/digikam/libs/dimg/loaders/pgfloader.cpp #977596:977597
@@ -149,7 +149,7 @@
colorModel = DImg::RGB;
break;
default:
- kDebug(50003) << "Cannot load PGF image: color mode not \
supported..." << endl; + kDebug(50003) << "Cannot load PGF image: \
color mode not supported (" << pgf.Mode() << ")" << endl; return false;
break;
}
@@ -162,7 +162,7 @@
m_hasAlpha = true;
break;
default:
- kDebug(50003) << "Cannot load PGF image: color channels number not \
supported..." << endl; + kDebug(50003) << "Cannot load PGF image: \
color channels number not supported (" << pgf.Channels() << ")" << endl; return \
false; break;
}
@@ -180,7 +180,7 @@
m_sixteenBit = true;
break;
default:
- kDebug(50003) << "Cannot load PGF image: color bits depth not \
supported..." << endl; + kDebug(50003) << "Cannot load PGF image: \
color bits depth not supported (" << bitDepth << ")" << endl; return false;
break;
}
@@ -275,14 +275,14 @@
PGFHeader header;
header.width = imageWidth();
header.height = imageHeight();
- header.bpp = imageBitsDepth();
header.channels = imageHasAlpha() ? 4 : 3;
+ header.bpp = imageBitsDepth() * header.channels;
header.quality = rate;
header.mode = imageHasAlpha() ? ImageModeRGBA : ImageModeRGBColor;
header.background.rgbtBlue = header.background.rgbtGreen = \
header.background.rgbtRed = 0; pgf.SetHeader(header);
- pgf.ImportBitmap(imageBytesDepth()*imageWidth(), (UINT8*)imageData(), \
imageBitsDepth(), + pgf.ImportBitmap(header.bpp*imageWidth(), \
(UINT8*)imageData(), header.bpp, channelMap, CallbackForLibPGF, this);
UINT32 nWrittenBytes = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic