Regular API function


Description Generates a scaled-up or scaled down version of the input image. See also simTransformImage, simLoadImage, simSaveImage and simSetVisionSensorCharImage.
C synopsis simUChar* simGetScaledImage(const simUChar* imageIn,const simInt* resolutionIn,const simInt* resolutionOut,simInt options,simVoid* reserved)
C parameters
imageIn: a pointer to rgb or rgba values of the input image.
resolutionIn: the resolution of the input image.
resolutionOut: the desired resolution of the output image. The values will be replaced by the effective resolution of the output image
options: bit-coded:
bit0 set (1): the input image is rgba, otherwise it is rgb
bit1 set (2): the returned image is rgba, otherwise it is rgb
bit2-3: 0:ignore aspect ratio, 4:keep aspect ratio (the effective resolution of the returned image will be different), 8:keep aspect ratio by expanding (the effective resolution of the returned image will be different)
bit4 set (16): no smooth transformation
reserved: Reserved for future extension. Set to NULL.
C return value
NULL if operation was not successful, otherwise a buffer containing the output image data. The user is in charge of releasing the buffer with simReleaseBuffer.
Lua synopsis string imageOut,table_2 effectiveRolutionOut=simGetScaledImage(string imageIn,table_2 resolutionIn,table_2 desiredResolutionOut,number options)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page