equal
deleted
inserted
replaced
63 sourceSize.scale(clipRect.width(), clipRect.height(), |
63 sourceSize.scale(clipRect.width(), clipRect.height(), |
64 Qt::KeepAspectRatioByExpanding); |
64 Qt::KeepAspectRatioByExpanding); |
65 imageReader.setScaledSize(sourceSize); |
65 imageReader.setScaledSize(sourceSize); |
66 |
66 |
67 //Crop center part of the scaled image as a target image |
67 //Crop center part of the scaled image as a target image |
68 clipRect.moveCenter(QPoint(sourceSize.width() / 2, sourceSize.height() / 2)); |
68 clipRect.moveCenter(QPoint(sourceSize.width() / 2 - 1, sourceSize.height() / 2 - 1)); |
69 imageReader.setScaledClipRect(clipRect); |
69 imageReader.setScaledClipRect(clipRect); |
70 |
70 |
71 mResult = imageReader.read().save(mTargetPath); |
71 mResult = imageReader.read().save(mTargetPath); |
72 } else { |
72 } else { |
73 mResult = false; |
73 mResult = false; |