Expand description
Image content extractor.
Extracts image files and prepares them for embedding. Optionally generates captions using a vision model.
Re-exportsยง
use crate::vision::ImageCaptioner;๐use async_trait::async_trait;๐use image::GenericImageView;๐use std::io::Cursor;๐use ragfs_core::ContentElement;๐use ragfs_core::ContentExtractor;๐use ragfs_core::ContentMetadataInfo;๐use ragfs_core::ExtractError;๐use ragfs_core::ExtractedContent;๐use ragfs_core::ExtractedImage;๐use std::path::Path;๐use std::sync::Arc;๐use tracing::debug;๐use tracing::warn;๐
Structsยง
- Image
Extractor - Extractor for image files.
Constantsยง
- MAX_
IMAGE_ PIXELS - Maximum decoded pixels accepted before captioning or embedding.
Functionsยง
- checked_
dimensions - Read dimensions without allocating a decoded bitmap.
- decode_
image_ ๐metadata - Decode image to get dimensions and format.
- mime_
type_ ๐from_ extension - Get MIME type from file extension.