Texture¶
-
class
ImageDynamic¶ -
BYTE= 1¶ Unsigned byte image, 8 bits/channel, \([0, 255]\) range.
-
SHORT= 2¶ Unsigned short, 16 bits/channel, \([0, 65535]\) range.
-
FLOAT= 4¶ Float, 32 bits/channel, \([0.0, 1.0]\) range.
-
ImageFormat¶
Texture¶
-
class
Texture¶ -
-
property
name¶ The name of the texture.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
group¶ The group of the texture.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
dpi_x¶ The texture DPI (dots/inch) in X direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
dpi_y¶ The texture DPI (dots/inch) in Y direction.
- Type
- Raises
ReadOnlyError -- If
Databaseis in read only mode.
-
property
format¶ The format of the image.
- Type
ImageFormat, read-only
-
property
dynamic¶ The pixel type of the image.
- Type
ImageDynamic, read-only
-
encoded_data(format, compression = -1)¶ Get the encoded data of the texture.
- Parameters
- Returns
The encoded data.
- Return type
-
remove(force = False)¶ Delete this texture
Note
By default, only not used textures can be deleted (
InUseErroris raised otherwise), useforceto force deletion of used textures.- Parameters
force (bool) -- Force the deletion of the texture even if it is in use.
- Raises
InUseError -- If
forceisFalseand the texture is used.ReadOnlyError -- If
Databaseis in read only mode.
-
property