Every digital image is a grid. This fact is both obvious and easy to ignore. But this structure affords opportunities for operations like sorting a series of pixels (in this case, rows) based on any color value (hue, saturation, value, or the amount of red, green or blue). Sorting pixels through the use of custom-created software is willfully naive of the content represented in the image. This can yield strange effects when the content legible in the image deviates from a gridded order (as is the case in this line drawing) or if the pixels are chromatically varied in local territories (as is the case with a noisy image or one that was purposefully dithered or optimized for compression).
Though this process works best when the content in the image and the algorithm operating on the image diverge, when outlines are imposed, selective readings of the original content are—slightly—preserved.