mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
329 stars 171 forks source link

Big-endian fix: Accessing bitmaps in region-bitmap.c #698

Closed uweigand closed 3 years ago

uweigand commented 3 years ago

The bitmaps used in region-bitmap.c are created by Cairo in the the CAIRO_FORMAT_A1 format. In this format, the order of 1-bit pixels stored in a byte varies depending on endianness.

Fix all accesses to these bits by introducing an is_bit_set helper macro that takes endianness into account.

uweigand commented 3 years ago

Ping?