dimensions need to be calculated before output paths to allow for using max width/height