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

Encode texture data into stream



```python

def encode(self, texture, stream):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| texture | [`TextureData`](/3d/python-net/aspose.threed.render/texturedata) | The texture data to be encoded |
| stream | io.RawIOBase | The output stream |
### Exceptions
| Exception | Description |
| :- | :- |
| IOException | Thrown when failed to write encoded texture to stream |





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