Line 4 loads them image, it does not scale it at all.
Line 5 is a very expensive NOOP, you are creating a scaled version of the image and then ignore it (return value not used at all).
In Line 6 is another unneeded operation, i.e. toImage(). If you want to work with QImage, use QImage instead of QPixmap. Right now you convert from image to pixmap (internally in line 4) and then back again in line 6.
Cheers,
_
Bookmarks