{
  "environment": {
    "avif_capability_source": "image_ops_plugin",
    "base_image": "public.ecr.aws/lambda/python@sha256:db0a8819d1529a640fbf1ca59378e7fa0ba08f2660389f1c76790362abdac8e9",
    "codec_versions": {
      "avif": "1.3.0",
      "jpg": "6.2",
      "libjpeg_turbo": "3.1.3",
      "webp": "1.6.0",
      "zlib": "1.2.11"
    },
    "image_ops_sha256": "2a1820c337ceb05b44b0332e4b66eaf9a1bba5f843d4d497f03c6c3e074b1d0b",
    "platform_machine": "x86_64",
    "platform_system": "Linux",
    "production_dependencies": {
      "numpy": "2.2.2",
      "opencv-python-headless": "4.11.0.86",
      "piexif": "1.1.3",
      "pillow": "12.1.0",
      "pillow-avif-plugin": "1.5.5",
      "pillow-heif": "1.0.0",
      "pillow-jxl-plugin": "1.3.7",
      "pypdfium2": "5.3.0"
    },
    "python_runtime": "3.13",
    "python_version": "3.13.14",
    "requirements_sha256": "e30c9a2e13dc5d3e3250068a62e7c5f1972a1a73376eb87556cb60377564642d",
    "runtime_contract": "aws-lambda-python3.13-linux-x86_64"
  },
  "fixtures": [
    {
      "description": "Synthetic gradients, soft scene structure, and deterministic microtexture.",
      "encodings": [
        {
          "bytes": 28376,
          "encoded_sha256": "2f9e77dd26713b95e733f32b951ece08cefee6470de6e4b5a78e57a4a7ffa239",
          "encoder_decision": "noisy_photo_guard",
          "encoder_meta": {
            "chroma_subsampling": "420",
            "color_mode": "color",
            "progressive": true,
            "quality": 85,
            "smart_decision": "noisy_photo_guard",
            "smart_grayscale_like": false,
            "smart_profile": {
              "detail_score": 0.0,
              "dynamic_score": 0.462412,
              "line_art_score": 0.095602,
              "megapixels": 0.256,
              "noise_score": 0.718953,
              "noisy_photo_score": 0.630624,
              "palette_active_bins": 32,
              "palette_simplicity": 0.0,
              "palette_top6_coverage": 0.295891,
              "profile": "noisy_photo",
              "saturation_score": 0.34874,
              "smooth_score": 0.672322
            },
            "strategy": "smart"
          },
          "format": "jpeg",
          "mime": "image/jpeg",
          "rgb_exact_match": false,
          "rgb_mae": 2.360632,
          "rgb_max_abs_error": 46,
          "rgb_psnr_db": 38.1823,
          "source_png_ratio": 0.089015
        },
        {
          "bytes": 15500,
          "encoded_sha256": "196e7248f6e1cadd889e38d96aab3d8da90f70d3b99ae7526962889c8308d924",
          "encoder_decision": "noisy_photo_guard",
          "encoder_meta": {
            "method": 5,
            "quality": 84,
            "smart_decision": "noisy_photo_guard",
            "smart_profile": {
              "detail_score": 0.0,
              "dynamic_score": 0.462412,
              "line_art_score": 0.095602,
              "megapixels": 0.256,
              "noise_score": 0.718953,
              "noisy_photo_score": 0.630624,
              "palette_active_bins": 32,
              "palette_simplicity": 0.0,
              "palette_top6_coverage": 0.295891,
              "profile": "noisy_photo",
              "saturation_score": 0.34874,
              "smooth_score": 0.672322
            },
            "strategy": "smart"
          },
          "format": "webp",
          "mime": "image/webp",
          "rgb_exact_match": false,
          "rgb_mae": 2.54554,
          "rgb_max_abs_error": 44,
          "rgb_psnr_db": 37.7602,
          "source_png_ratio": 0.048623
        },
        {
          "bytes": 36315,
          "encoded_sha256": "1e48752400d30193857ef588fef08de25684e8fd62da3083333f9333b6265733",
          "encoder_decision": "noisy_photo_guard",
          "encoder_meta": {
            "quality": 83,
            "smart_decision": "noisy_photo_guard",
            "smart_grayscale_like": false,
            "smart_profile": {
              "detail_score": 0.0,
              "dynamic_score": 0.462412,
              "line_art_score": 0.095602,
              "megapixels": 0.256,
              "noise_score": 0.718953,
              "noisy_photo_score": 0.630624,
              "palette_active_bins": 32,
              "palette_simplicity": 0.0,
              "palette_top6_coverage": 0.295891,
              "profile": "noisy_photo",
              "saturation_score": 0.34874,
              "smooth_score": 0.672322
            },
            "speed": 6,
            "strategy": "smart"
          },
          "format": "avif",
          "mime": "image/avif",
          "rgb_exact_match": false,
          "rgb_mae": 1.828331,
          "rgb_max_abs_error": 40,
          "rgb_psnr_db": 40.1922,
          "source_png_ratio": 0.113919
        },
        {
          "bytes": 139581,
          "encoded_sha256": "6f18731195e95391a23ed43f0ba4a69c35a1615467b2af26b3dc09fc06d44de3",
          "encoder_decision": "quantized_balanced",
          "encoder_meta": {
            "colors": 213,
            "compress_level": 8,
            "decision": "quantized_balanced",
            "optimize": true,
            "palette_active_bins": 32,
            "palette_simplicity": 0.0,
            "palette_top6_coverage": 0.29589,
            "quality": 82,
            "quantized_bytes": 139581,
            "size_savings_ratio": 0.56214,
            "strategy": "smart",
            "truecolor_bytes": 318778,
            "variant": "quantized",
            "visual_delta": 0.0027
          },
          "format": "png",
          "mime": "image/png",
          "rgb_exact_match": false,
          "rgb_mae": 1.091312,
          "rgb_max_abs_error": 27,
          "rgb_psnr_db": 42.2724,
          "source_png_ratio": 0.437863
        }
      ],
      "id": "photo-like",
      "source": {
        "bytes": 318778,
        "height": 400,
        "mode": "RGB",
        "path": "/quality/benchmarks/source-photo-like.png",
        "rgb_pixel_sha256": "4375b68150dc310f898f3ff8193766a21d06ef2241abf8075d5a6ef187f111f8",
        "sha256": "dcc7f53dc478c83659c7b7b2b8b0909ee37be050cdb6377c048191b9b1c80ebd",
        "width": 640
      }
    },
    {
      "description": "Synthetic dashboard cards, flat fills, controls, and chart marks.",
      "encodings": [
        {
          "bytes": 19310,
          "encoded_sha256": "cd897a85025a8c8f5641a9c59499358e624f7152a261aeb163de34d11f7ee3b9",
          "encoder_decision": "smooth_graphic_balance_webp_lossless_auto",
          "encoder_meta": {
            "chroma_subsampling": "422",
            "color_mode": "color",
            "progressive": false,
            "quality": 78,
            "smart_decision": "smooth_graphic_balance_webp_lossless_auto",
            "smart_grayscale_like": false,
            "smart_profile": {
              "detail_score": 0.01465,
              "dynamic_score": 0.843052,
              "line_art_score": 0.319962,
              "megapixels": 0.256,
              "noise_score": 0.0,
              "noisy_photo_score": 0.16861,
              "palette_active_bins": 24,
              "palette_simplicity": 0.34357,
              "palette_top6_coverage": 0.856859,
              "profile": "smooth_graphic",
              "saturation_score": 0.0,
              "smooth_score": 0.838582
            },
            "strategy": "smart"
          },
          "format": "jpeg",
          "mime": "image/jpeg",
          "rgb_exact_match": false,
          "rgb_mae": 1.150984,
          "rgb_max_abs_error": 109,
          "rgb_psnr_db": 37.015,
          "source_png_ratio": 5.493599
        },
        {
          "bytes": 1474,
          "encoded_sha256": "6345f699157f83f19b14eddade1396f384aa0b5b9eb3dfc4e4a9e53bff259985",
          "encoder_decision": "smooth_graphic_balance_webp_lossless_auto",
          "encoder_meta": {
            "method": 4,
            "smart_auto_lossless": true,
            "smart_decision": "smooth_graphic_balance_webp_lossless_auto",
            "smart_profile": {
              "detail_score": 0.01465,
              "dynamic_score": 0.843052,
              "line_art_score": 0.319962,
              "megapixels": 0.256,
              "noise_score": 0.0,
              "noisy_photo_score": 0.16861,
              "palette_active_bins": 24,
              "palette_simplicity": 0.34357,
              "palette_top6_coverage": 0.856859,
              "profile": "smooth_graphic",
              "saturation_score": 0.0,
              "smooth_score": 0.838582
            },
            "strategy": "lossless"
          },
          "format": "webp",
          "mime": "image/webp",
          "rgb_exact_match": true,
          "rgb_mae": 0.0,
          "rgb_max_abs_error": 0,
          "rgb_psnr_db": null,
          "source_png_ratio": 0.419346
        },
        {
          "bytes": 2417,
          "encoded_sha256": "c2c1202b3d53f65d3683885ce3a17a20fa65fdb713ad5e9d983fcb69f6d9d363",
          "encoder_decision": "smooth_graphic_balance_webp_lossless_auto",
          "encoder_meta": {
            "quality": 74,
            "smart_decision": "smooth_graphic_balance_webp_lossless_auto",
            "smart_grayscale_like": false,
            "smart_profile": {
              "detail_score": 0.01465,
              "dynamic_score": 0.843052,
              "line_art_score": 0.319962,
              "megapixels": 0.256,
              "noise_score": 0.0,
              "noisy_photo_score": 0.16861,
              "palette_active_bins": 24,
              "palette_simplicity": 0.34357,
              "palette_top6_coverage": 0.856859,
              "profile": "smooth_graphic",
              "saturation_score": 0.0,
              "smooth_score": 0.838582
            },
            "speed": 6,
            "strategy": "smart"
          },
          "format": "avif",
          "mime": "image/avif",
          "rgb_exact_match": false,
          "rgb_mae": 0.914988,
          "rgb_max_abs_error": 82,
          "rgb_psnr_db": 36.9669,
          "source_png_ratio": 0.687624
        },
        {
          "bytes": 2562,
          "encoded_sha256": "8c8a05ce1d264381ab627d91f41afe1eb2265f21d9135b700e57a58d1a68af89",
          "encoder_decision": "quantized_balanced",
          "encoder_meta": {
            "colors": 213,
            "compress_level": 8,
            "decision": "quantized_balanced",
            "optimize": true,
            "palette_active_bins": 24,
            "palette_simplicity": 0.34357,
            "palette_top6_coverage": 0.85686,
            "quality": 82,
            "quantized_bytes": 2562,
            "size_savings_ratio": 0.27112,
            "strategy": "smart",
            "truecolor_bytes": 3515,
            "variant": "quantized",
            "visual_delta": 0.0
          },
          "format": "png",
          "mime": "image/png",
          "rgb_exact_match": true,
          "rgb_mae": 0.0,
          "rgb_max_abs_error": 0,
          "rgb_psnr_db": null,
          "source_png_ratio": 0.728876
        }
      ],
      "id": "flat-ui",
      "source": {
        "bytes": 3515,
        "height": 400,
        "mode": "RGB",
        "path": "/quality/benchmarks/source-flat-ui.png",
        "rgb_pixel_sha256": "b75634f6b44c9af61e15117a98ab08496f203ede0588676717bc3ab86c800fa1",
        "sha256": "4fe618904c3ea8a040259da8ef4a1e9b74d56c66ec64e07c539ed2a17161a38a",
        "width": 640
      }
    },
    {
      "description": "Synthetic monochrome technical lines, grids, circles, and hard edges.",
      "encodings": [
        {
          "bytes": 60810,
          "encoded_sha256": "ed93ab936773c134ec6a3ed005a2653dad1402f3b02f2c2b404d84e8f9c26a5c",
          "encoder_decision": "line_art_text_guard_grayscale_webp_lossless_auto",
          "encoder_meta": {
            "chroma_subsampling": "444",
            "color_mode": "color",
            "progressive": false,
            "quality": 91,
            "smart_decision": "line_art_text_guard_grayscale_webp_lossless_auto",
            "smart_grayscale_like": true,
            "smart_grayscale_probe": {
              "color_bytes": 60810,
              "gray_bytes": 58671,
              "grayscale_gain_ratio": 0.03518
            },
            "smart_grayscale_reverted": true,
            "smart_profile": {
              "detail_score": 0.949799,
              "dynamic_score": 0.852331,
              "line_art_score": 0.955863,
              "megapixels": 0.256,
              "noise_score": 0.0,
              "noisy_photo_score": 0.170466,
              "palette_active_bins": 26,
              "palette_simplicity": 0.351883,
              "palette_top6_coverage": 0.866703,
              "profile": "line_art_text",
              "saturation_score": 0.0,
              "smooth_score": 0.219713
            },
            "strategy": "smart"
          },
          "format": "jpeg",
          "mime": "image/jpeg",
          "rgb_exact_match": false,
          "rgb_mae": 0.392359,
          "rgb_max_abs_error": 15,
          "rgb_psnr_db": 46.8271,
          "source_png_ratio": 8.91773
        },
        {
          "bytes": 2428,
          "encoded_sha256": "0bc1f9825b84073e6a3f764beb0b0bc977ac5f0bd5b0089b44601430db3e2b6a",
          "encoder_decision": "line_art_text_guard_grayscale_webp_lossless_auto",
          "encoder_meta": {
            "method": 6,
            "smart_auto_lossless": true,
            "smart_decision": "line_art_text_guard_grayscale_webp_lossless_auto",
            "smart_profile": {
              "detail_score": 0.949799,
              "dynamic_score": 0.852331,
              "line_art_score": 0.955863,
              "megapixels": 0.256,
              "noise_score": 0.0,
              "noisy_photo_score": 0.170466,
              "palette_active_bins": 26,
              "palette_simplicity": 0.351883,
              "palette_top6_coverage": 0.866703,
              "profile": "line_art_text",
              "saturation_score": 0.0,
              "smooth_score": 0.219713
            },
            "strategy": "lossless"
          },
          "format": "webp",
          "mime": "image/webp",
          "rgb_exact_match": true,
          "rgb_mae": 0.0,
          "rgb_max_abs_error": 0,
          "rgb_psnr_db": null,
          "source_png_ratio": 0.356064
        },
        {
          "bytes": 3181,
          "encoded_sha256": "8c996ffb46dbb3be98c220700ca411a6ffb1dde7ba7ed631859cb6f80d227b0c",
          "encoder_decision": "line_art_text_guard_grayscale_webp_lossless_auto",
          "encoder_meta": {
            "quality": 90,
            "smart_decision": "line_art_text_guard_grayscale_webp_lossless_auto",
            "smart_grayscale_like": true,
            "smart_profile": {
              "detail_score": 0.949799,
              "dynamic_score": 0.852331,
              "line_art_score": 0.955863,
              "megapixels": 0.256,
              "noise_score": 0.0,
              "noisy_photo_score": 0.170466,
              "palette_active_bins": 26,
              "palette_simplicity": 0.351883,
              "palette_top6_coverage": 0.866703,
              "profile": "line_art_text",
              "saturation_score": 0.0,
              "smooth_score": 0.219713
            },
            "speed": 5,
            "strategy": "smart"
          },
          "format": "avif",
          "mime": "image/avif",
          "rgb_exact_match": true,
          "rgb_mae": 0.0,
          "rgb_max_abs_error": 0,
          "rgb_psnr_db": null,
          "source_png_ratio": 0.466491
        },
        {
          "bytes": 4016,
          "encoded_sha256": "b9c8c5335c01565241fe4935b9e65a5bf4e76dc4b53700792090eb67e28bdab6",
          "encoder_decision": "quantized_balanced",
          "encoder_meta": {
            "colors": 213,
            "compress_level": 8,
            "decision": "quantized_balanced",
            "optimize": true,
            "palette_active_bins": 26,
            "palette_simplicity": 0.35188,
            "palette_top6_coverage": 0.8667,
            "quality": 82,
            "quantized_bytes": 4016,
            "size_savings_ratio": 0.41106,
            "strategy": "smart",
            "truecolor_bytes": 6819,
            "variant": "quantized",
            "visual_delta": 0.0
          },
          "format": "png",
          "mime": "image/png",
          "rgb_exact_match": true,
          "rgb_mae": 0.0,
          "rgb_max_abs_error": 0,
          "rgb_psnr_db": null,
          "source_png_ratio": 0.588943
        }
      ],
      "id": "line-art",
      "source": {
        "bytes": 6819,
        "height": 400,
        "mode": "RGB",
        "path": "/quality/benchmarks/source-line-art.png",
        "rgb_pixel_sha256": "9ccf50909e43bb1ff2c0316a225e4030c6e18d4a80c63858d95e8d89c25df236",
        "sha256": "ab6ee06dcc2918fe30b69e63144b70e3ebf386905092e9b6192e3bd916657886",
        "width": 640
      }
    }
  ],
  "limitations": [
    "These synthetic fixtures do not represent every camera, scan, illustration, or UI asset.",
    "PSNR and MAE measure RGB sample error, not subjective quality or downstream compatibility.",
    "Byte counts can change with Pillow, codec, platform, or image_ops revisions.",
    "This reference records one fixed build and is not a file-size, quality, or compression-ratio promise.",
    "Runtime measurements are intentionally excluded."
  ],
  "methodology": {
    "compress_options": {
      "strategy": "smart"
    },
    "encoder_entrypoint": "lambda/image_ops.py::_encode_with_compression",
    "fixture_count": 3,
    "fixture_dimensions": {
      "height": 400,
      "width": 640
    },
    "rgb_mae": "Mean absolute error across every decoded RGB channel sample.",
    "rgb_psnr_db": "10*log10(255^2/MSE) across decoded RGB samples; null means an exact RGB match.",
    "source_mode": "RGB",
    "source_png_ratio": "Encoded bytes divided by deterministic source PNG bytes."
  },
  "reference_date": "2026-07-30",
  "schema_version": 1
}
