FileFormat.Detect
Contents
[
Hide
]Detect(Stream, string)
Detect the file format from data stream, file name is optional for guessing types that has no magic header.
public static FileFormat Detect(Stream stream, string fileName)
Parameter | Type | Description |
---|---|---|
stream | Stream | |
fileName | String |
Examples
byte[] bytes = new byte[100];//take the bytes from your source
var fmt = FileFormat.Detect(new MemoryStream(bytes), "input-file");
Console.WriteLine($"Input data format: {fmt}");
See Also
- class FileFormat
- namespace Aspose.ThreeD
- assembly Aspose.3D
Detect(string)
Detect the file format from file name, file must be readable so Aspose.3D can detect the file format through file header.
public static FileFormat Detect(string fileName)
Parameter | Type | Description |
---|---|---|
fileName | String |
Examples
var fmt = FileFormat.Detect("input.fbx");
Console.WriteLine($"Input file format: {fmt}");
See Also
- class FileFormat
- namespace Aspose.ThreeD
- assembly Aspose.3D