diff options
| author | manuel <manuel@nc8430.lan> | 2009-05-01 20:33:33 +0200 |
|---|---|---|
| committer | manuel <manuel@nc8430.lan> | 2009-05-01 20:33:33 +0200 |
| commit | bca08c6de2b156cbec90944c809e5e7faecd231d (patch) | |
| tree | d544ced2a8eb082cf1f393eb524519884909ed6d /ue2/imgsynth2/cwindowsbitmap.cpp | |
| parent | b9ce1555b2baf9be209775dbd4c8b217db5cd735 (diff) | |
| download | ooprog-bca08c6de2b156cbec90944c809e5e7faecd231d.tar.gz ooprog-bca08c6de2b156cbec90944c809e5e7faecd231d.tar.bz2 ooprog-bca08c6de2b156cbec90944c809e5e7faecd231d.zip | |
cwindowsbitmap: seek to bitmap data
cpixmap: use copy() instead of accessing array via indices
Diffstat (limited to 'ue2/imgsynth2/cwindowsbitmap.cpp')
| -rw-r--r-- | ue2/imgsynth2/cwindowsbitmap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ue2/imgsynth2/cwindowsbitmap.cpp b/ue2/imgsynth2/cwindowsbitmap.cpp index ebbdd4c..ddacab9 100644 --- a/ue2/imgsynth2/cwindowsbitmap.cpp +++ b/ue2/imgsynth2/cwindowsbitmap.cpp | |||
| @@ -58,6 +58,7 @@ void CWindowsBitmap::read(std::ifstream& in) | |||
| 58 | if (m_pixeldata != NULL) | 58 | if (m_pixeldata != NULL) |
| 59 | delete[] m_pixeldata; | 59 | delete[] m_pixeldata; |
| 60 | m_pixeldata = new uint8_t[m_infoheader.biSizeImage]; | 60 | m_pixeldata = new uint8_t[m_infoheader.biSizeImage]; |
| 61 | in.seekg(m_fileheader.bfOffBits); | ||
| 61 | in.read(reinterpret_cast<char *>(m_pixeldata), m_infoheader.biSizeImage); | 62 | in.read(reinterpret_cast<char *>(m_pixeldata), m_infoheader.biSizeImage); |
| 62 | } | 63 | } |
| 63 | 64 | ||
