Documentation
¶
Overview ¶
Package rasterasset validates manager-side image input without file/network access, HTML parsing, panel dependencies or early monochrome composition.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DecodeDataURL ¶
DecodeDataURL accepts only data:image/png;base64, with padded RFC4648 standard base64 and no whitespace. It returns caller-owned pixels with alpha intact; the renderer must composite against the actual scene before thresholding. No URL resolver, global image decoder registry, or source metadata is exposed.
func DecodeJPEGDataURL ¶
DecodeJPEGDataURL accepts canonical JPEG data URLs with the same allocation limits as PNG. JPEG is opaque and lossy; it is not compared pixel-for-pixel with its pre-encoding source. DecodeConfig precedes pixel allocation. https://pkg.go.dev/image#hdr-Security_Considerations
Types ¶
type Limits ¶
type Limits struct {
MaxURLBytes, MaxPNGBytes, MaxDimension, MaxPixels int
}
Limits are positive administrator-supplied per-image bounds, not HTML values. MaxURLBytes includes the prefix/base64; MaxPNGBytes bounds the decoded source file, not its pixels (the legacy field name also applies to JPEG). Callers must also enforce a document-wide asset budget.