Regular API function

simLoadImage

Description Loads an image from file. See also simSaveImage, simGetScaledImage, simTransformImage and simSetVisionSensorCharImage.
C synopsis simUChar* simLoadImage(simInt* resolution,simInt options,const simChar* filename,simVoid* reserved)
C parameters
resolution: a pointer that will accept the image resolution.
options: bit-coded. If bit0 is set (1), then the returned image is rgba, otherwise it is rgb.
filename: the name of the file to read. The file extension indicates the format.
reserved: Reserved for future extension. Set to NULL.
C return value
NULL if operation was not successful, otherwise a buffer containing the image data. The user is in charge of releasing the buffer with simReleaseBuffer.
Lua synopsis string image,table_2 resolution=simLoadImage(number options,string filename)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page