summaryrefslogtreecommitdiffstats
path: root/ue2/imgsynth2/cwindowsbitmap.cpp
diff options
context:
space:
mode:
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/*----------------------------------------------------------------------------*/