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%
{
"context": "This criteria evaluates how well the engineer uses the pillow-heif package to convert Pillow images to HEIF format. The focus is on proper usage of from_pillow() for creating HeifFile objects and save() for encoding with appropriate parameters.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Use from_pillow()",
"description": "Uses pillow_heif.from_pillow() or HeifFile.from_pillow() to create a HeifFile object from a PIL.Image.Image object loaded via PIL.Image.open()",
"max_score": 30
},
{
"name": "Save HeifFile",
"description": "Uses the HeifFile.save() method to write the HEIF file to disk, passing the output file path as the first argument",
"max_score": 20
},
{
"name": "Quality parameter",
"description": "Passes the quality parameter to the save() method to control encoding quality (0-100 for lossy, -1 for lossless)",
"max_score": 20
},
{
"name": "EXIF preservation",
"description": "Preserves EXIF metadata by accessing it from the PIL.Image.info dictionary and passing it to save() via the exif parameter",
"max_score": 20
},
{
"name": "Output path handling",
"description": "Correctly determines the output path by either using the provided output_path parameter or deriving it from input_path by replacing the extension with .heif",
"max_score": 10
}
]
}