changes for RGB support

These are the same changes that I did for 0.7.2, and posted the python and patch files in the google group.