Skip to content

Commit a5ca9d8

Browse files
committed
Fix incorrect channel order saving palette-based BMP files
1 parent 8726714 commit a5ca9d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kos/src/libvideo/gfx/io/bmp.c.inl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,10 @@ INTERN ATTR_NOINLINE WUNUSED NONNULL((1, 2)) int CC
637637
libvideo_buffer_save_bmp(struct video_buffer *__restrict self,
638638
FILE *stream, char const *options) {
639639
struct ATTR_PACKED bmp_pal_color {
640-
uint8_t r, g, b, zero;
640+
uint8_t b;
641+
uint8_t g;
642+
uint8_t r;
643+
uint8_t zero;
641644
};
642645
struct ATTR_PACKED bm_hdr {
643646
BITMAPFILEHEADER bmFile;

0 commit comments

Comments
 (0)