number FreeImage_Rescale(number dib, number dest_width, number dest_height, number filter)
Description:
This function performs resampling (or scaling, zooming) of a greyscale or RGB(A) image to the desired destination width and height. A NULL value is returned when the bitdepth cannot be handled or when there's not enough memory (this may happen with very large images).
16-bit RGB bitmap are returned as 24-bit. Palettized and 4-bit bitmap are returned as 8-bit palettized images, using an internal conversion to 24-bit followed by a color quantization, or are returned as 32-bit if they contain transparency.
Resampling refers to changing the pixel dimensions (and therefore display size) of an image. When you downsample (or decrease the number of pixels), information is deleted from the image. When you upsample (or increase the number of pixels), new pixels are added based on color values of existing pixels. You specify an interpolation filter to determine how pixels are added or deleted.
Return value:
Returns the scaled image if succeeded, or null if failed.