get_format_by_extension method
get_format_by_extension
Gets the preferred file format from the file extension name The extension name should starts with a dot(’.’).
Returns
Instance of FileFormat
, otherwise null returned.
def get_format_by_extension(self, extension_name):
...
Parameter | Type | Description |
---|---|---|
extension_name | str |
Example
The following code shows how to save scene to memory using specified format
from aspose.threed import FileFormat, Scene
from aspose.threed.entities import Box
from io import BytesIO
scene = Scene(Box())
outputFormat = ".glb"
format = FileFormat.get_format_by_extension(outputFormat)
with BytesIO() as ms:
scene.save(ms, format)
See Also
- module
aspose.threed.formats
- class
FileFormat
- class
RvmFormat