Integer to byte conversion
Posted
by quano
on Stack Overflow
See other posts from Stack Overflow
or by quano
Published on 2010-04-01T17:29:22Z
Indexed on
2010/04/01
22:43 UTC
Read the original article
Hit count: 251
Say I've got an integer, 13941412, that I wish to separate into bytes (the number is actually a color in the form 0x00bbggrr). How would you do that? In c, you'd cast the number to a BYTE and then shift the bits. How do you cast to byte in Python?
© Stack Overflow or respective owner