Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# Compatibility Members for QImage

The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.

QImage class reference

### Public Functions

- void invertPixels ( bool invertAlpha )
- QImage smoothScale ( int w, int h, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio ) const
- QImage smoothScale ( const QSize & s, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio ) const
- QImage xForm ( const QMatrix & matrix ) const

## Member Function Documentation

### void QImage::invertPixels ( bool invertAlpha )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

### QImage QImage::smoothScale ( int w, int h, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio ) const

Returns a smoothly scaled copy of the image. The returned image has a size of width w by height h pixels if mode is `Qt::IgnoreAspectRatio`. The modes `Qt::KeepAspectRatio` and `Qt::KeepAspectRatioByExpanding` may be used to preserve the ratio of the image: if mode is `Qt::KeepAspectRatio`, the returned image is guaranteed to fit into the rectangle specified by w and h (it is as large as possible within the constraints); if mode is `Qt::KeepAspectRatioByExpanding`, the returned image fits at least into the specified rectangle (it is a small as possible within the constraints). Note that the algorithm used favors speed rather than smoothness.

For 32-bpp images and 1-bpp/8-bpp color images the result will be 32-bpp, whereas all-gray images (including black-and-white 1-bpp) will produce 8-bit grayscale images with the palette spanning 256 grays from black to white.

See also scale() and mirror().

### QImage QImage::smoothScale ( const QSize & s, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

The requested size of the image is s.

### QImage QImage::xForm ( const QMatrix & matrix ) const

Transforms the image using the given matrix and returns the result as a new image.