50% commit of new image.py ; still needs to be tested locally and to modify ExtendToNChannel