or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pillow-heif@1.1.x
tile.json

tessl/pypi-pillow-heif

tessl install tessl/pypi-pillow-heif@1.1.0

Python 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%

task.mdevals/scenario-7/

XMP Metadata Extractor

Build a tool that extracts and displays XMP metadata from HEIF/AVIF image files.

Requirements

Create a Python module that provides functionality to read and extract XMP metadata from HEIF and AVIF image files. The tool should handle both files with XMP data and files without XMP data gracefully.

Capabilities

Extract XMP metadata from HEIF images

  • Opening a HEIF file that contains XMP metadata returns the XMP data as a UTF-8 encoded string @test
  • Opening a HEIF file without XMP metadata returns None or an empty result @test

Extract XMP metadata from AVIF images

  • Opening an AVIF file with XMP metadata returns the XMP data as a UTF-8 encoded string @test

Handle invalid input gracefully

  • Attempting to extract XMP from a non-existent file raises an appropriate error @test

Implementation

@generates

API

def extract_xmp(file_path: str) -> str | None:
    """
    Extract XMP metadata from a HEIF or AVIF image file.

    Args:
        file_path: Path to the HEIF/AVIF image file

    Returns:
        XMP metadata as a UTF-8 string if present, None otherwise

    Raises:
        FileNotFoundError: If the file does not exist
        ValueError: If the file is not a valid HEIF/AVIF file
    """
    pass

Dependencies { .dependencies }

pillow-heif { .dependency }

Provides HEIF/AVIF image processing with metadata support.

@satisfied-by