Regular API function

simSaveImage

Description Saves an image to file. See also simLoadImage, simGetScaledImage and simGetVisionSensorCharImage.
C synopsis simSaveImage(const simUChar* image,const simInt* resolution,simInt options,const simChar* filename,simInt quality,simVoid* reserved)
C parameters
image: a pointer to rgb or rgba values.
resolution: the x/y resolution of the provided image.
options: bit-coded. If bit0 is set (1), then the provided image is rgba, otherwise it is rgb.
filename: the name of the file to write. The file extension indicates the format.
quality: the quality of the written image: 0 for best compression, 100 for largest file. Use -1 for default behaviour.
reserved: Reserved for future extension. Set to NULL.
C return value
-1 if operation was not successful.
Lua synopsis number result=simSaveImage(string image,table_2 resolution,number options,string filename,number quality)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page