fixed brightness problem
changed buffer from signed char to unsigned