In addition, grey scale images were originally calculated
so that each color component of each pixel was looped
through, and a grey scale value for that pixel was calculated
from the combination of all color components. After the
optimization, only part of the pixels was looped through. As
the width and height of the input image is divisible by two,
the total resolution from multiplying these two is divisible by
four. It was therefore more efficient to stop at every fourth
pixel and, specifically, at its last color component, and
calculate the grey scale value based on the previous three
pixels and their color components.