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 utility that converts raw image data into HEIF format and extracts basic image properties.
Your utility should accept raw RGB pixel data along with image dimensions and convert it to HEIF format.
After creating a HEIF file from raw data, the utility should be able to extract and return the image properties.
@generates
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
"""
passProvides HEIF/AVIF image format support for encoding and decoding.
@satisfied-by