{"library":"pillow-jxl-plugin","title":"Pillow JPEG-XL Plugin","description":"Pillow plugin for adding JPEG-XL (JXL) image format support, leveraging Rust bindings for performance. It seamlessly integrates with Pillow's `Image.open()` and `Image.save()` methods. The library is actively maintained with frequent minor releases, often addressing CI improvements, dependency updates, and adding new JXL features like float16 decode and EXIF support.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install pillow-jxl-plugin"],"cli":null},"imports":["from PIL import Image"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from PIL import Image\nimport os\n\n# Note: pillow-jxl-plugin automatically registers itself upon installation.\n# No explicit 'import pillow_jxl' is usually needed.\n\n# Create a dummy image for saving\ntry:\n    dummy_img = Image.new('RGB', (100, 100), color = 'red')\n    dummy_img.save('example.jxl', lossless=True, speed=4)\n    print(\"example.jxl created successfully.\")\n\n    # Open a JPEG-XL image\n    img = Image.open('example.jxl')\n    print(f\"Opened JXL image: {img.format}, mode={img.mode}, size={img.size}\")\n\n    # Convert to another format and save (optional)\n    img.convert('RGB').save('example.png')\n    print(\"example.png saved.\")\n\n    # Clean up (optional)\n    os.remove('example.jxl')\n    os.remove('example.png')\n    print(\"Cleaned up example files.\")\n\nexcept FileNotFoundError:\n    print(\"Make sure 'example.jxl' (or another JXL file) exists in the current directory if you want to test opening a pre-existing one.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to open and save JPEG-XL images using the standard Pillow API. The `pillow-jxl-plugin` integrates directly, so no special JXL-specific functions are called; simply use `Image.open()` and `Image.save()` with `.jxl` file extensions.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}