Skip to content

Commit b5fc489

Browse files
committed
[ePicload]
* add missing palette for 8 bit non scaled
1 parent 7cda9a1 commit b5fc489

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/gdi/picload.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,6 +1361,9 @@ int ePicLoad::getData(ePtr<gPixmap>& result) {
13611361
unsigned char* origin = m_filepara->pic_buffer;
13621362
unsigned char* tmp_buffer = ((unsigned char*)(surface->data));
13631363
if (m_filepara->bits == 8) {
1364+
surface->clut.data = m_filepara->palette;
1365+
surface->clut.colors = m_filepara->palette_size;
1366+
m_filepara->palette = NULL; // transfer ownership
13641367
memcpy(tmp_buffer, origin, scrx * scry);
13651368
} else if (m_filepara->bits == 24) {
13661369
for (int y = 0; y < scry; ++y) {

0 commit comments

Comments
 (0)