orderZigZag (from jpeg.c) rewritten, but not work correctly at this time.