`TPixel` (which `pixel` is) has no `FromBgra4444`

TPixel (which pixel is) has no FromBgra4444
11 Replies
Lyris the Kitori
Lyris the KitoriOP16mo ago
i have brain damage that wont work
khitiara
khitiara16mo ago
what from methods does TPixel have?
Lyris the Kitori
Lyris the KitoriOP16mo ago
not enough one would say
Lyris the Kitori
Lyris the KitoriOP16mo ago
No description
khitiara
khitiara16mo ago
ah dang yeah nothing there gonna help much
Lyris the Kitori
Lyris the KitoriOP16mo ago
does C# have a builtin "reverse bits of this number" anywhere
khitiara
khitiara16mo ago
bits? i dont think so theres reverseendianness in binaryprimitives but i think thats just byte order not bit order
Lyris the Kitori
Lyris the KitoriOP16mo ago
ye thats only byte order i need to do stuff like packed BGRA4444 -> ARGB4444
khitiara
khitiara16mo ago
hmm b = (byte)((b * 0x0202020202 & 0x010884422010) % 1023); this came up in a quick search but i dont even remotely understand it
Lyris the Kitori
Lyris the KitoriOP16mo ago
thats one byte i need for larger integer types
khitiara
khitiara16mo ago
mhm do that for each byte and then reverseendianness

Did you find this page helpful?