Fixed handling of transparent images
Added ReSharper formatting rules, and applied them to all existing files.
Fixed "thresholded" sorting algorithms never touching the first segment of a row/column.