[Solved] How to change resolution of an image with Qt?
-
@QImage QImage::scaledToWidth ( int width, Qt::TransformationMode mode = Qt::FastTransformation ) const@
bq.
Returns a scaled copy of the image. The returned image is scaled to the given width using the specified transformation mode.
This function automatically calculates the height of the image so that its aspect ratio is preserved.
If the given width is 0 or negative, a null image is returned@QImage QImage::scaledToHeight ( int height, Qt::TransformationMode mode = Qt::FastTransformation ) const@
bq.
Returns a scaled copy of the image. The returned image is scaled to the given height using the specified transformation mode.
This function automatically calculates the width of the image so that the ratio of the image is preserved.
If the given height is 0 or negative, a null image is returned.