TextureResource(filepath | width, in_ram | height, color, bit_depth)
Object that holds pixel information. If a file path is specifed, the bitmap needs to be a 16-bit or less format. If at least a width and height are specified instead, a blank white RGB565 texture is created in RAM but an initial color can also be passed. If a `bit_depth` is passed, the first entry in the color table will be set to `color` and the entire blank image will index to that.
Parameters:
filepath | width
[value: string | 0 ~ 65535, type: string | int]
in_ram | height
[value: True or False (default: False) | 0 ~ 65535, type: bool | int]
color
[value: int 16-bit RGB565 (optional), type: int]
bit_depth
[value: 1, 4, 8, or 16 (optional), type: int]
Attributes:
width
[value: any (read-only), type: float]
height
[value: any (read-only), type: float]
bit_depth
[value: any (read-only), type: int]
red_mask
[value: any (read-only), type: int]
blue_mask
[value: any (read-only), type: int]
green_mask
[value: any (read-only), type: int]
alpha_mask
[value: any (read-only), type: int]
data
[value: RGB565 bytearray (note, if in_ram is False, then writing to this is not a valid operation), type: bytearray]
colors
[value: RGB565 bytearray (when the bit-depth is less than 16, this will be filled with RGB565 converted colors), type: bytearray]
file: src/resources/engine_texture_resource.c