ImageTiling class

How to split each attached image into tiles before prompt rendering.

Set on ModelSpec.imageTiling (or directly on LlamaChatClient) to have every image-typed DataContent replaced, in place, by columns x rows overlapping PNG crops. Each crop consumes its own vision-encoder token budget and its own media marker, so prefill cost scales with the tile count.

Constructors

ImageTiling({int columns = 2, int rows = 2, double overlap = 0.1, int minimumEdge = 512, bool includeFullImage = false})
Creates a tiling configuration; the default splits into 2x2 tiles with 10% overlap.
const

Properties

columns int
Number of tile columns.
final
hashCode int
The hash code for this object.
no setteroverride
includeFullImage bool
Whether to keep the untiled image ahead of its tiles, giving the model a whole-page view for layout plus the crops for detail. Costs one extra image budget per attachment.
final
minimumEdge int
Images whose width AND height are both below this skip tiling and pass through unchanged — small images gain nothing from being split.
final
overlap double
Fraction of a tile's width/height duplicated into each neighbouring tile, so text straddling a cut line appears whole in at least one tile. 0.1 duplicates 10% on each interior edge.
final
rows int
Number of tile rows.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applies(Image image) bool
Whether image is large enough to be worth splitting.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override