Bug fixing, refactoring, and output refinement

- offset and spacing arguments are now processed correctly when not
  supplied
- image resizing is the last thing we do, which helps improve the
  quality of the output
- lots more debug logging to indicate what's happening at varios stages
- reduced the impact of the affine transform