LlamaImage class
Represents an image input for the Llama model.
This class is designed to be safely sent between Dart isolates. It stores either a file path or raw image bytes. The actual file reading and native conversion is deferred until it's processed inside the Llama instance.
- Inheritance
-
- Object
- LlamaInput
- LlamaImage
Constructors
- LlamaImage.fromBytes(Uint8List bytes)
- Creates a LlamaImage from raw image bytes (e.g., from a network request). When sent to another isolate, this will cause the entire byte array to be copied.
- LlamaImage.fromFile(File file)
- Creates a LlamaImage from a file. This is the preferred method when working with isolates as it only sends the file path string, not the full image data.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBitmap(
llama_cpp lib, Allocator allocator) → BitmapPointers -
Internal method to convert the image data into a native
mtmd_bitmap. This is called by the Llama class and handles the FFI conversion. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited