further moves to new imageIO class.  Currently has some corruption issues in writing the image data (header seems to be OK.)