EncodedImage
classin packageklyn.gui.images
public class EncodedImage extends RasterImage
└ EncodedImage

Raster image decoded directly from encoded bytes, without a temporary file. The descriptor owns its decoded pixels; recorded Painter frames retain their snapshot even after collection of this descriptor. PNG/BMP are supported on KlynOS; PNG, JPEG, GIF, BMP and TIFF follow installed host codecs on Linux/Windows. Decoded dimensions are limited to 4096 per axis and encoded input to 16 MiB. Animated images expose their first frame only.

Example

image = EncodedImage(HttpClient().getBinary(url).content)

Inherited Properties
propertyInherited Properties from RasterImage: height, width
propertyInherited Properties from Image: fileName, height, width
Constructors
Modifier and Type Member Description
public EncodedImage
EncodedImage(encoded as Byte[])
Decodes a private pixel snapshot from immutable input bytes.
Methods
Modifier and Type Member Description
public override load
load(filename as String) as Void
Encoded snapshots cannot be replaced by a file load.
Inherited Methods
methodInherited Methods from RasterImage: crop, load, render, resize
methodInherited Methods from Image: crop, getImage, load, resize