Inspired by a tweet from Wolfram Research and their link to this, I made this Manipulate. Hopefully it will inspire others to do better?
Manipulate[
Image[RotateLeft[#, t] & /@
RotateLeft[SortBy[ImageData[im], fun[#[[All, c]]] &], s]],
{{fun, First, "function applied"}, {First, Last, Mean, Median, Norm,
Normalize, StandardDeviation, Total, Accumulate,
Flatten@Gather[#] &, Sort, Commonest, Differences,
TrimmedMean[#, .35] & -> "trimmedMean",
TakeLargest[#, 1] & -> "takelargest", Nearest[#, {0, 0, .5}] &},
PopupMenu},
{{c, 1, "color"}, {1 -> "red", 2 -> "green", 3 -> "blue"}, SetterBar},
{{s, 0, "shift up-down"}, -200, 200, 1},
{{t, 0, "shift right-left"}, -200, 200, 1}]
The original pic is here One result of pixel sort is here
Attachments: