workaround for qt inaccuracies when drawing transformed images