SoOffscreenRenderAreaRenderToFile Method (String, SoOffscreenRenderAreaOutputFormats) |
Render the given scene graph and save the result in the given file.
Namespace: OIV.Inventor
public bool RenderToFile( string filename, SoOffscreenRenderAreaOutputFormats outputFormat )
path and name of the image file to be generated. If the file extension is not one of the above type, no file is generated.
defines which components to write to the output. If set to OIV.Inventor.SoOffscreenRenderArea.OutputFormats.RGBA, the alpha component of the rendering is also written to the file. However if the targeted file type does not support alpha component, the file will be generated with OIV.Inventor.SoOffscreenRenderArea.OutputFormats.RGB components only. See the 3rd column of the above table.
The format of the generated image is chosen automatically according to the file extension. Returns true if successful.
If your application needs more control over creation of the file, please see the OIV.Inventor.SoOffscreenRenderArea.RenderToBuffer(OIV.Inventor.Devices.SoBufferObject, OIV.Inventor.SoOffscreenRenderArea.OutputFormats) method.
Supported file types are:
extension file (case insensitive) | raster image type | Alpha Component Support |
.bmp | Windows bitmap | YES |
.dds | DirectDraw surface | YES |
.gif | Graphics Interchange Format | YES |
.hdr | hdr | NO |
.jp2, .j2c, .j2k, .jpc, .jpx, .ecw, .ecwp | jpeg 2000 | YES |
.jpg, .jpeg, .jif, .jfif | Joint Photographic Experts Group | NO |
.png | Portable Network Graphics | YES |
.ps | PostScript | NO |
.rgb .sgi | sgi | YES |
.tif .tiff | Tagged Image File Format | YES |