LocalImageProcessor

org.llm4s.imageprocessing.provider.LocalImageProcessor

Local image processor that uses Java's built-in image processing capabilities. This implementation doesn't require external API calls and provides basic image manipulation operations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def analyzeImage(imagePath: String, prompt: Option[String]): Either[LLMError, ImageAnalysisResult]

Analyzes an image and returns a description.

Analyzes an image and returns a description.

Value parameters

imagePath

Path to the image file

prompt

Optional prompt to guide the analysis

Attributes

Returns

Either error or image analysis result

Definition Classes
override def convertFormat(imagePath: String, targetFormat: ImageFormat): Either[LLMError, ProcessedImage]

Converts image format.

Converts image format.

Value parameters

imagePath

Path to the input image

targetFormat

Target image format

Attributes

Returns

Either error or converted image

Definition Classes
override def preprocessImage(imagePath: String, operations: List[ImageOperation]): Either[LLMError, ProcessedImage]

Preprocesses an image with specified operations.

Preprocesses an image with specified operations.

Value parameters

imagePath

Path to the input image

operations

List of preprocessing operations to apply

Attributes

Returns

Either error or processed image

Definition Classes
override def resizeImage(imagePath: String, width: Int, height: Int, maintainAspectRatio: Boolean): Either[LLMError, ProcessedImage]

Resizes an image to specified dimensions.

Resizes an image to specified dimensions.

Value parameters

height

Target height

imagePath

Path to the input image

maintainAspectRatio

Whether to maintain aspect ratio

width

Target width

Attributes

Returns

Either error or resized image

Definition Classes