transform_image_from_file
Transform an image file using Gemini and a text prompt, optionally saving the generated image to a directory.
Instructions
Transform an image file using Gemini.
Args: image_file_path: Path to the source image file. prompt: Text description of desired transformation. output_dir: Optional directory to save the generated image. If not provided, the image is only returned in the response (not saved to disk). model: Optional Gemini model name. If not provided, uses GEMINI_MODEL environment variable. ctx: Optional context for progress reporting.
Returns: List containing ImageContent with the transformed image, and optionally TextContent with file path if saved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| prompt | Yes | ||
| output_dir | No | ||
| image_file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |