add gray channel support