mask byte not nibble (#701)

This commit is contained in:
Michael Miller
2023-05-06 21:18:38 -07:00
committed by GitHub
parent 6ad69a8914
commit b1b71920f0
3 changed files with 10 additions and 10 deletions

View File

@@ -35,11 +35,11 @@ public:
// due to endianness the byte order must be copied to output
*p++ = color.G >> 8;
*p++ = color.G & 0x0f;
*p++ = color.G & 0xff;
*p++ = color.R >> 8;
*p++ = color.R & 0x0f;
*p++ = color.R & 0xff;
*p++ = color.B >> 8;
*p = color.B & 0x0f;
*p = color.B & 0xff;
}
static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel)

View File

@@ -35,11 +35,11 @@ public:
// due to endianness the byte order must be copied to output
*p++ = color.R >> 8;
*p++ = color.R & 0x0f;
*p++ = color.R & 0xff;
*p++ = color.G >> 8;
*p++ = color.G & 0x0f;
*p++ = color.G & 0xff;
*p++ = color.B >> 8;
*p = color.B & 0x0f;
*p = color.B & 0xff;
}
static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel)

View File

@@ -36,13 +36,13 @@ public:
// due to endianness the byte order must be copied to output
*p++ = color.R >> 8;
*p++ = color.R & 0x0f;
*p++ = color.R & 0xff;
*p++ = color.G >> 8;
*p++ = color.G & 0x0f;
*p++ = color.G & 0xff;
*p++ = color.B >> 8;
*p++ = color.B & 0x0f;
*p++ = color.B & 0xff;
*p++ = color.W >> 8;
*p = color.W & 0x0f;
*p = color.W & 0xff;
}
static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel)