ok, finally giving in and posting for clues/advice here.
the way i am currently doing it almost works, but produces an image that is still juuuust slightly too scrambled to read in most cases. i'm sorting using the background of the image itself, and the total RGB value of each line (assuming the background is more or less a gradient). if anyone cares, the relevant code is here, and should be pretty much self explanatory:
Removed by Defience
i know i'm missing something, i just can't for the life of me figure out what. does anyone have any hints/clues that might help me figure this one out? don't want to solution given to me, just maybe a nudge in the right direction?