started working on pixel-sorting filter; so far only reads and writes the pixels (in grayscale)