Result = ResizeImage(#Image, Width, Height [, Mode])
Resize the #Image to the given dimension.


#Image The image to resize.
Width, Height The new dimensions of the image. Both width and height must be greater than zero. #PB_Ignore can be specified for width or height, so this value won't be changed.
Mode (optional) The resize method. It can be one of the following values:
  #PB_Image_Smooth: Resize the image with smoothing (default).
  #PB_Image_Raw   : Resize the image without any interpolation.

Return value

Returns nonzero if the operation succeeded and zero if it failed.


This function changes the handle of the used image. Therefore it must be newly assigned e.g. to an ImageGadget() with SetGadgetState().

This function does not work with icon images (.ico).

The limit for the image size that can be handled depends on the operating system and the available amount of memory. If enough memory is available, then images up to at least 8192x8192 are can be handled by all operating systems supported by PureBasic.

See Also

ImageWidth(), ImageHeight()

Supported OS


<- RemoveImageFrame() - Image Index - SaveImage() ->