From bcadfa267f976fe9f29afa50a635cbe3ea174e38 Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 2 May 2009 16:44:53 +0200 Subject: - colortable now uses uint32_t as identifier - rewrote xpm colortable parsing to convert their identifiers to our own and vica vi - implemented indexed8::setpixel/getpixel - moved rowsize to member variable in cbitmap - added second test for xpm/indexed8 --- ue2/imgsynth2/cwindowsbitmap.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ue2/imgsynth2/cwindowsbitmap.cpp') diff --git a/ue2/imgsynth2/cwindowsbitmap.cpp b/ue2/imgsynth2/cwindowsbitmap.cpp index ddacab9..d561465 100644 --- a/ue2/imgsynth2/cwindowsbitmap.cpp +++ b/ue2/imgsynth2/cwindowsbitmap.cpp @@ -75,6 +75,11 @@ void CWindowsBitmap::read(std::ifstream& in) } if (m_pixelformat == NULL) throw FileError("Bitmap bitcount is not supported."); + + /* calc rowsize - boundary is 32 */ + m_rowsize = 4 * static_cast( + ((m_pixelformat->getBitCount() * m_infoheader.biWidth) + 31) / 32 + ); } /*----------------------------------------------------------------------------*/ -- cgit v1.2.3