`255` vs `255.` won't really matter here since it's being cast to `np.float64`, but I had the `255.` in there for completeness to make it clear that `val` is being converted to the relevant float range.