Detect the MinimumX, MinimumY and MaximumX, MaximumY non transparent Pixels and create a QRect.
There is copyRect method for QImage...