summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2/cwindowsbitmap.cpp
diff options
context:
space:
mode:
authormanuel <manuel@nc8430.lan>2009-05-02 16:44:53 +0200
committermanuel <manuel@nc8430.lan>2009-05-02 16:44:53 +0200
commitbcadfa267f976fe9f29afa50a635cbe3ea174e38 (patch)
treeb069a34c9d100dcc9229311b47cbfa0697ee7fc9 /ue2/imgsynth2/cwindowsbitmap.cpp
parentbca08c6de2b156cbec90944c809e5e7faecd231d (diff)
downloadooprog-bcadfa267f976fe9f29afa50a635cbe3ea174e38.tar.gz
ooprog-bcadfa267f976fe9f29afa50a635cbe3ea174e38.tar.bz2
ooprog-bcadfa267f976fe9f29afa50a635cbe3ea174e38.zip
- 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
Diffstat (limited to 'ue2/imgsynth2/cwindowsbitmap.cpp')
-rw-r--r--ue2/imgsynth2/cwindowsbitmap.cpp5
1 files changed, 5 insertions, 0 deletions
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)
75 } 75 }
76 if (m_pixelformat == NULL) 76 if (m_pixelformat == NULL)
77 throw FileError("Bitmap bitcount is not supported."); 77 throw FileError("Bitmap bitcount is not supported.");
78
79 /* calc rowsize - boundary is 32 */
80 m_rowsize = 4 * static_cast<uint32_t>(
81 ((m_pixelformat->getBitCount() * m_infoheader.biWidth) + 31) / 32
82 );
78} 83}
79 84
80/*----------------------------------------------------------------------------*/ 85/*----------------------------------------------------------------------------*/