revise QtHelper to adapt to any image size