Updated posterize method to account for ties.

Signed-off-by: Brock Overcash <brock.overcash@gmail.com>