simvx.graphics.assets.image_loader

Image file I/O for textures — loading and saving PNG/JPG.

Module Contents

Functions

load_texture_from_file

Load PNG/JPG texture from disk → device-local VkImage.

save_png

Save RGBA uint8 pixels (H, W, 4) as a PNG file. Pure Python, no Pillow.

Data

log

API

simvx.graphics.assets.image_loader.log[source]

‘getLogger(…)’

simvx.graphics.assets.image_loader.load_texture_from_file(device: Any, physical_device: Any, queue: Any, cmd_pool: Any, file_path: str) tuple[Any, Any, int, int][source]

Load PNG/JPG texture from disk → device-local VkImage.

Returns: (image, memory, width, height)

simvx.graphics.assets.image_loader.save_png(path: str | pathlib.Path, pixels: numpy.ndarray) None[source]

Save RGBA uint8 pixels (H, W, 4) as a PNG file. Pure Python, no Pillow.