GenericWriter: fix some mixup between args.renderWindow and srcBounds
and tmpRowbytes and srcRowbytes

Also add possibility to render with an output format being the project
format