Build a pixel structure, given the mask words in the second header and * a packed 16 or 32 bit pixel */
| 561 | /* Build a pixel structure, given the mask words in the second header and |
| 562 | * a packed 16 or 32 bit pixel */ |
| 563 | static struct Pixel |
| 564 | build_pixel(const struct BitmapInfoHeader *header, uint32 color) |
| 565 | { |
| 566 | struct Pixel pixel; |
| 567 | |
| 568 | pixel.r = pixel_element(header->RedMask, color); |
| 569 | pixel.g = pixel_element(header->GreenMask, color); |
| 570 | pixel.b = pixel_element(header->BlueMask, color); |
| 571 | pixel.a = header->AlphaMask ? pixel_element(header->AlphaMask, color) : 255; |
| 572 | return pixel; |
| 573 | } |
| 574 | |
| 575 | /* Extract one element (red, green, blue or alpha) from a pixel */ |
| 576 | static unsigned char |
no test coverage detected