579 |
if (!compress) |
if (!compress) |
580 |
{ |
{ |
581 |
int y; |
int y; |
582 |
bmpdata = xmalloc(width * height); |
bmpdata = xmalloc(width * height * (bpp / 8)); |
583 |
for (y = 0; y < height; y++) |
for (y = 0; y < height; y++) |
584 |
{ |
{ |
585 |
in_uint8a(s, &bmpdata[(height - y - 1) * width], width); |
in_uint8a(s, &bmpdata[(height - y - 1) * (width * (bpp / 8))], width * (bpp / 8)); |
586 |
} |
} |
587 |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
588 |
xfree(bmpdata); |
xfree(bmpdata); |
593 |
in_uint16_le(s, size); |
in_uint16_le(s, size); |
594 |
in_uint8s(s, 4); /* line_size, final_size */ |
in_uint8s(s, 4); /* line_size, final_size */ |
595 |
in_uint8p(s, data, size); |
in_uint8p(s, data, size); |
596 |
|
bmpdata = xmalloc(width * height * (bpp / 8)); |
597 |
bmpdata = xmalloc(width * height); |
if (bitmap_decompress(bmpdata, width, height, data, size, bpp)) |
|
if (bitmap_decompress(bmpdata, width, height, data, size)) |
|
598 |
{ |
{ |
599 |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
600 |
} |
} |
|
|
|
601 |
xfree(bmpdata); |
xfree(bmpdata); |
602 |
} |
} |
603 |
} |
} |