Added option to write "viewable" (8bit) grayscale images.