Fix argument parsing
Fix formatting
Add example for 16-bit grayscale encoding