Made mode 1 compute the prefix sums of image bins.