tessl install tessl/pypi-pillow-heif@1.1.0Python interface for libheif library providing HEIF/AVIF image processing with both standalone and Pillow plugin capabilities
Agent Success
Agent success rate when using this tile
94%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.45x
Baseline
Agent success rate without this tile
65%
Create a command-line utility that converts images from common formats (PNG, JPEG) to HEIF and AVIF formats with customizable quality settings.
Build a Python module that provides image format conversion functionality with the following features:
The module should provide a function that converts an input image file to either HEIF or AVIF format. The function should:
The converter should support quality control:
The converter should handle images with transparency:
@generates
def convert_image(input_path: str, output_path: str, format: str, quality: int = 85) -> None:
"""
Convert an image to HEIF or AVIF format.
Args:
input_path: Path to the input image file (PNG or JPEG)
output_path: Path where the converted image will be saved
format: Target format, either "HEIF" or "AVIF"
quality: Compression quality (0-100), or -1 for lossless (default: 85)
Raises:
ValueError: If format is not "HEIF" or "AVIF"
FileNotFoundError: If input file does not exist
"""
passProvides HEIF and AVIF image encoding and decoding capabilities.
@satisfied-by
Provides core image processing functionality for reading input images.
@satisfied-by