Terry Reedy wrote: > "Craig" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Thanks so much for the response. I have an array of individual bytes > > which will eventually make up a binary bitmap image that is loaded onto > > an LCD screen (1 = black dot, 0 = white dot). At the moment each byte > > is reversed to what it should be (completely reverse the bit order): > > e.g 00111101 should be 10111100, 11001100 should be 00110011, etc. It > > is not an int problem as such, it is more a bit level swap if you get > > what I mean. If you could help that would be great. > > Using any of the solutions posted by others, I would first make a 256 byte > string in which each byte was the bit reversed version of its index. > > IE, bitrev = "\x00\x80\x40\xC0.....\xFF" > > Then your actual image processing is a simple, quick lookup for each byte. > > Terry Jan Reedy
Thanks for all your great help guys. They work great. -- http://mail.python.org/mailman/listinfo/python-list