Split 24-bit file handling

Split 24-bit handling so 8 and 16  bit files can use faster method.
Improved some routines to give speed increases. Fixed bug when
processing 8 bit files.