ImageProcessingClient
org.llm4s.imageprocessing.ImageProcessingClient
trait ImageProcessingClient
Main interface for image processing operations.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Value members
Abstract methods
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
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
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
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
In this article