Overview
TheImageItem type represents a single image in the annotation dataset. It contains the original file, a blob URL for display, all associated annotations, and the image dimensions.
Type Definition
Properties
Unique identifier for the image. Generated using a combination of filename, last modified timestamp, and a UUID:
The original File object from the user’s file input. Contains the actual image data.
A blob URL created using
URL.createObjectURL(file) for displaying the image in the browser. Must be revoked when the image is removed.Array of all bounding box annotations associated with this image.
The natural width of the image in pixels. Populated after the image loads.
The natural height of the image in pixels. Populated after the image loads.
Usage Example
Creating new image items when files are selected:Memory Management
Blob URLs created withURL.createObjectURL() must be manually revoked to prevent memory leaks:
Related Types
- AnnotationBox - Individual annotations within the image
- CsvRow - Flattened format combining image and annotation data