Special-case 24-bit RGB image-handling.
Clean up putBinaryImageData().
Introduce ImageKind constants.
Merge pull request #4336 from nnethercote/rgb24

Special-case 24-bit RGB image-handling