showImage
Canonical ID: media.showImage. Nederlands: toonAfbeelding.
Displays a packaged image as a retained full-scene background. The host resolves the asset; the program receives no file handle or unrestricted path access. Bounded PNG, JPEG, and GIF images are supported where the host implements image media. Use a .bipli project that contains the referenced file; the example is not a self-contained loose source application.
Signature
showImage(asset)
Arguments
| Parameter | Type | Requirement |
|---|---|---|
asset |
Text | Nonempty packaged project-relative asset path, normally under assets/. |
Return value
None.
Example
# language: en
showImage("assets/background.png")
drawText(320, 20, "Pliro", 28, "white", "sans", "center")
Import assets/background.png into the project first. The image appears behind the label on a media-capable host.
Notes and common mistakes
Use the function name for your source language. Its canonical ID is a shared documentation label; you do not type that ID as a call. Giving your own variable or function the same name can hide the built-in. Supply the documented arguments and value types. Pliro reports mismatches when checking can detect them, or when the call runs.
A host is the app or environment running your program. To see a drawing, it needs a renderer, the part that draws on screen. The command-line command pliro run shows text but does not draw these graphics. The host support table explains which effects work in the IDE, browser, native app, and phone preview. A native build reports an unsupported capability instead of leaving it out.
The example requires the named files inside a .bipli project. Packaged assets are currently limited to 12 MiB each. Paths under assets/ are project references, not arbitrary files or URLs. Current native export does not implement playSound.
Related entries
playSound · Programming guides · Host support · Calls and arguments
