
## encode(, texture, stream, format) {#aspose.threed.render.TextureData-io.RawIOBase-str}

Encode texture data into stream using specified format



```python

@staticmethod
def encode(texture, stream, format):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| texture | [`TextureData`](/3d/python-net/aspose.threed.render/texturedata) | The texture to be encoded |
| stream | io.RawIOBase | The output stream |
| format | str | The image format of encoded data, like png/jpg |
### Exceptions
| Exception | Description |
| :- | :- |
| NotSupportedException |  |





### See Also
* module [`aspose.threed.render`](../../)
* class [`TextureCodec`](/3d/python-net/aspose.threed.render/texturecodec)
