# getOutputFormat

Function

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/write.ts#L56

```ts
getOutputFormat(filename: string, options: Options): OutputFormat
```

Determines the output format based on file extension and options.

**Parameters**

- `filename` (`string`): The filename to analyze.
- `options` ([`Options`](https://api.playcanvas.com/splat-transform/types/Options.md)): Options that may affect format selection.

**Returns** [`OutputFormat`](https://api.playcanvas.com/splat-transform/types/OutputFormat.md): The detected output format.

**throws** Error if the file extension is not recognized.

**Example**

```ts
const format = getOutputFormat('scene.ply', {});  // returns 'ply'
const format2 = getOutputFormat('scene.sog', {});  // returns 'sog-bundle'
```
