Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
yxhuvud
17 hours ago
|
parent
|
context
|
favorite
| on:
Should you normalize RGB values by 255 or 256?
Both solutions add 0.5, the difference is where in the process it happens.
help
account42
1 hour ago
[–]
They don't - trunc(result * 255 + 0.5) is just round(result * 255), i.e. error is on average 0 whereas trunc(result * 256) has an average bias of -0.5.
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: