Class: QgsRasterResampler

class qgis.core.QgsRasterResampler

Bases: sip.wrapper

Interface for resampling rasters (e.g. to have a smoother appearance)

Methods

clone

Gets a deep copy of this object.

resample

Resamples a source image to a destination image.

tileBufferPixels

Returns the optional tile buffer size in pixels.

type

Gets a descriptive type identifier for this raster resampler.

clone(self)QgsRasterResampler

Gets a deep copy of this object. Needs to be reimplemented by subclasses. Ownership is transferred to the caller.

Return type

QgsRasterResampler

resample(self, srcImage: QImage, dstImage: QImage)

Resamples a source image to a destination image.

The size of the passed destination image should be respected during the resampling process.

Deprecated since version QGIS: 3.10.1 use the more efficient QgsRasterResamplerV2 interface instead.

Parameters
  • srcImage (QImage) –

  • dstImage (QImage) –

tileBufferPixels(self) → int

Returns the optional tile buffer size in pixels. This represents the size to buffer individual resampled tile requests prior to resampling, in order to avoid rendering artifacts at the edges of raster tile boundaries.

New in version 3.10.1.

Return type

int

type(self) → str

Gets a descriptive type identifier for this raster resampler. Needs to be implemented by subclasses.

Return type

str