{
  "id": "02-text-layer",
  "source": {
    "path": "practice/source/02-text-layer.psd",
    "bytes": 78269,
    "sha256": "f04b5742624cc1fc7756cc378cda6ce4faca79b87682de6460bf099c9d0247af"
  },
  "expected_png": {
    "path": "practice/source/02-text-layer-expected.png",
    "bytes": 3331,
    "sha256": "cc5582951de95b485920959f960f8e0ff32e6349c510052f568290954b8ce47a"
  },
  "steps": [
    {
      "label": "source-info",
      "evidence": "practice/evidence/cli-psd-02-text-layer-source-info.json",
      "exit_code": 0
    },
    {
      "label": "direct-png",
      "evidence": "practice/evidence/cli-psd-02-text-layer-direct-png.json",
      "exit_code": 0
    },
    {
      "label": "save-psd",
      "evidence": "practice/evidence/cli-psd-02-text-layer-save-psd.json",
      "exit_code": 0
    },
    {
      "label": "saved-info",
      "evidence": "practice/evidence/cli-psd-02-text-layer-saved-info.json",
      "exit_code": 0
    },
    {
      "label": "reopened-png",
      "evidence": "practice/evidence/cli-psd-02-text-layer-reopened-png.json",
      "exit_code": 0
    }
  ],
  "all_cli_commands_succeeded": true,
  "input_unchanged": true,
  "input_psd_independent_inspection": {
    "dimensions": [
      640,
      400
    ],
    "bits_per_channel": 8,
    "color_mode": "RGB",
    "layer_count": 2,
    "layers": [
      {
        "name": "Background \u2014 pale sky",
        "kind": "pixel",
        "bbox": [
          0,
          0,
          640,
          400
        ],
        "visible": true,
        "has_pixels": true,
        "has_mask": false
      },
      {
        "name": "EDIT ME \u2014 editable text",
        "kind": "type",
        "bbox": [
          0,
          0,
          640,
          400
        ],
        "visible": true,
        "has_pixels": true,
        "has_mask": false,
        "text": "EDIT ME",
        "transform": [
          1.0,
          0.0,
          0.0,
          1.0,
          60.0,
          180.0
        ],
        "engine_data_text": "EDIT ME\r",
        "fonts": [
          "AdobeInvisFont",
          "ArialMT"
        ],
        "font_size_px": 60.0
      }
    ]
  },
  "direct_png": {
    "path": "practice/output/02-text-layer-cli.png",
    "bytes": 3898,
    "sha256": "7b624ff7a16c19ff01d7cd174eca75fe5b642e1bfb3eb2dac922061865805b9d"
  },
  "direct_png_vs_expected": {
    "dimensions_match": true,
    "dimensions": [
      640,
      400
    ],
    "exact_match": false,
    "different_pixels": 883,
    "maximum_channel_difference": 28,
    "mean_absolute_channel_difference": 0.033181640625,
    "difference_bbox": [
      64,
      137,
      301,
      180
    ]
  },
  "saved_psd": {
    "path": "practice/output/02-text-layer-cli-roundtrip.psd",
    "bytes": 60621,
    "sha256": "1ed69ca6496e84284dd70242918229a04000f763478eaf7545b00dde519ac6da"
  },
  "saved_psd_independent_inspection": {
    "dimensions": [
      640,
      400
    ],
    "bits_per_channel": 8,
    "color_mode": "RGB",
    "layer_count": 2,
    "layers": [
      {
        "name": "Background \u2014 pale sky",
        "kind": "pixel",
        "bbox": [
          0,
          0,
          640,
          400
        ],
        "visible": true,
        "has_pixels": true,
        "has_mask": false
      },
      {
        "name": "EDIT ME \u2014 editable text",
        "kind": "type",
        "bbox": [
          64,
          137,
          301,
          180
        ],
        "visible": true,
        "has_pixels": true,
        "has_mask": false,
        "text": "EDIT ME",
        "transform": [
          1.0,
          0.0,
          0.0,
          1.0,
          60.0,
          180.0
        ],
        "engine_data_text": "EDIT ME\r",
        "fonts": [
          "AdobeInvisFont",
          "ArialMT"
        ],
        "font_size_px": 60.0
      }
    ]
  },
  "layer_count_preserved": true,
  "layer_kinds_preserved": true,
  "mask_presence_preserved": true,
  "text_strings_preserved": true,
  "expected_png_note": "Expected PNG is a Pillow-generated cached raster placeholder, not a Photoshop reference export. PhotoCraft rerenders the real editable type layer; its text string, 60px font size and (60,180) text transform remain intact. The observed pixel differences are confined to the text region and are not a roundtrip drift.",
  "reopened_png": {
    "path": "practice/output/02-text-layer-cli-roundtrip.png",
    "bytes": 3898,
    "sha256": "7b624ff7a16c19ff01d7cd174eca75fe5b642e1bfb3eb2dac922061865805b9d"
  },
  "reopened_png_vs_direct_png": {
    "dimensions_match": true,
    "dimensions": [
      640,
      400
    ],
    "exact_match": true,
    "different_pixels": 0,
    "maximum_channel_difference": 0,
    "mean_absolute_channel_difference": 0.0,
    "difference_bbox": null
  },
  "reopened_png_vs_expected": {
    "dimensions_match": true,
    "dimensions": [
      640,
      400
    ],
    "exact_match": false,
    "different_pixels": 883,
    "maximum_channel_difference": 28,
    "mean_absolute_channel_difference": 0.033181640625,
    "difference_bbox": [
      64,
      137,
      301,
      180
    ]
  }
}
