Fix #1, support rgb format