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-2/

Image Data Converter

Build a utility that converts raw image data into HEIF format and extracts basic image properties.

Capabilities

Convert raw RGB data to HEIF

Your utility should accept raw RGB pixel data along with image dimensions and convert it to HEIF format.

  • A function accepts RGB mode, size (800, 600), and raw bytes data, returning a file object in HEIF format @test
  • A function accepts RGBA mode, size (400, 300), and raw bytes with alpha channel, returning a HEIF file @test

Extract image properties from created files

After creating a HEIF file from raw data, the utility should be able to extract and return the image properties.

  • Extract size property from a HEIF file created from raw RGB data, returning (width, height) tuple @test
  • Extract color mode from a HEIF file created from raw RGBA data, returning the mode string @test

Implementation

@generates

API

def create_heif_from_bytes(mode: str, size: tuple, data: bytes) -> bytes:
    """
    Create a HEIF format file from raw pixel data.

    Args:
        mode: Color mode string (e.g., "RGB", "RGBA")
        size: Image dimensions as (width, height) tuple
        data: Raw pixel data as bytes

    Returns:
        HEIF file data as bytes
    """
    pass

def get_image_properties(heif_data: bytes) -> dict:
    """
    Extract properties from HEIF data.

    Args:
        heif_data: HEIF file data as bytes

    Returns:
        Dictionary with 'size' (tuple) and 'mode' (str) keys
    """
    pass

Dependencies { .dependencies }

pillow-heif { .dependency }

Provides HEIF/AVIF image format support for encoding and decoding.

@satisfied-by