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%
Build a tool that extracts and processes auxiliary images from HEIF/AVIF image files. Many modern HEIF files contain auxiliary images like alpha mattes, gain maps, and other metadata images that are stored alongside the main image.
@generates
def extract_aux_images(heif_path: str) -> list[dict]:
"""
Extract all auxiliary images from a HEIF file.
Args:
heif_path: Path to the HEIF/AVIF file
Returns:
List of dictionaries, each containing:
- 'aux_type': str - The type of auxiliary image
- 'aux_id': int - The ID of the auxiliary image
- 'size': tuple - (width, height) of the auxiliary image
- 'mode': str - Color mode of the auxiliary image
"""
pass
def get_aux_image_by_id(heif_path: str, aux_id: int) -> dict:
"""
Retrieve a specific auxiliary image by its ID.
Args:
heif_path: Path to the HEIF/AVIF file
aux_id: ID of the auxiliary image to retrieve
Returns:
Dictionary containing:
- 'size': tuple - (width, height) of the image
- 'mode': str - Color mode of the image
- 'data': bytes - Raw image data
Raises:
ValueError: If the auxiliary image ID is invalid
"""
passProvides support for reading HEIF/AVIF files and accessing auxiliary images.
@satisfied-by