cc @broulik
The change mainly reduce the size of the output image saving memory and compute in later stage, since it won't have to downscale the image anymore.
Can go to master as well.