code cleanup. hardcoded threshold, use adjust{brightness=xx,brightness-threshold} to control black/white ratio