graphics.image · function ·
LoadGraphicsImageFileByteSource
Reads through the bounded core File service and immediately snapshots the bytes, so callers never need to retain a mutable I/O buffer.
Decode and represent image data, including bounded PNG, JPEG, WebP, and SVG paths.
external LoadGraphicsImageFileByteSource(text contentIdentity, text format, text path, int byteLimit, text source) returns graphicsImageByteSourceStatus: source-declared
Parameters
text contentIdentity- Supply content identity as text.
text format- Supply format as text.
text path- Supply path as text.
int byteLimit- Supply byte limit as int.
text source- Supply source as text.
Use LoadGraphicsImageFileByteSource
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using graphics.image
// Decode and represent image data, including bounded PNG, JPEG, WebP, and SVG paths.
text contentIdentity = "sample"
text format = "png"
text path = "path"
int byteLimit = 1
text source = "example"
graphicsImageByteSource result = LoadGraphicsImageFileByteSource(contentIdentity, format, path, byteLimit, source)
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.graphics_image__loadgraphicsimagefilebytesource"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/graphics/image/encoded_source.yh:136