Theres a very good description and code by David Tait. http://www.man.ac.uk/~mbhstdj/files/index.html pichex01.zip Hex Utilites.