bool Resize( int width, int height, CRasterImage& dst, int resizeMethod = RI_RESIZE_PICK_GRID_PIXELS ) const;


width  width of the destination image
height height of the destination image
dst Destination for the resize operation. The resized image will be stored into this object

Specifies which resize alghoritm will be used. Can be one of the following values

RI_RESIZE_PICK_GRID_PIXELS - this is faster alghoritm. Usually produces sharper images for smaller picures (such as thumbnails). For larger pictures the resize operation migh produce little bit more grainy picture than when using the RI_RESIZE_BLEND_PIXELS alghoritm.

RI_RESIZE_BLEND_PIXELS - resulting resized pixels are result of blending all source pixels overlapping the resized pixel. This alghoritm is slower and provides more smoother images. For small images results might seem not sharp. This alghoritm provides (arguably) better pictures for higher resolution images (size 512x512 and more).

Return Value

true in case of success, false in case of failure. If function fails then additional error information will be stored in the dst object and can be retrieved by calling dst.GetLastErrorMessage().


The Resize function creates image with specified width and height and copies such new image into provided dst CRasterImage object. Original content of the dst image will be destroyed. Destination CRasterImage object image will be created with the same storage type as the storage type of source image.

This function is available since ClassGL version 3.6.10.

See Also

CRasterImage class methods