Fix pixel computations