Your initial problem is that the pixels are being drawn in the wrong order. That's why your jpeg looks like it's being viewed through a lenticular screen. You need to either swap pairs of bytes or swap nybbles within bytes (probably the former) in order to get it to print out properly.
Beyond that, I don't understand what you're asking.