| 162 | } |
| 163 | |
| 164 | static void ai88ToRGBA(const uint8_t* src, uint8_t* dst, int w, int h) |
| 165 | { |
| 166 | const auto* in = reinterpret_cast<const uint16_t*>(src); |
| 167 | for (int i = 0; i < w * h; ++i) |
| 168 | { |
| 169 | uint8_t intensity = in[i] & 0xFF; |
| 170 | uint8_t alpha = (in[i] >> 8) & 0xFF; |
| 171 | dst[i * 4 + 0] = intensity; |
| 172 | dst[i * 4 + 1] = intensity; |
| 173 | dst[i * 4 + 2] = intensity; |
| 174 | dst[i * 4 + 3] = alpha; |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | static void argb8888ToRGBA(const uint8_t* src, uint8_t* dst, int w, int h) |
| 179 | { |