Read binary to ascii

Fix line number that caused weird writing to binary for width and height
Formatting
Support binary to ascii