merged rainers jpeg patch, and converted newlines to Unix style.