ISEPOS-2373 Add coordinates to SVG overlay files #10

Merged
mieszkomakuch merged 10 commits from ISEPOS-2373-add-coordinates-for-svg-overlay into master 2025-06-05 14:26:36 +02:00
Showing only changes of commit cce0cd258d - Show all commits

View File

@ -536,6 +536,11 @@ verbose: {verbose}")
meta_elem = ET.SubElement(root, "metadata")
meta_elem.text = json.dumps(bbox_dict)
# (Optional) Also store the bounding box as a data attribute for quick access
root.set("data-bbox", json.dumps(bbox_dict))
tree.write(svg_path, encoding="utf-8", xml_declaration=True)
logger.info(f"Embedded bbox into {svg_path} → {bbox_dict}")
# -----------------------------------------
# END Inject bounding box (BBOX) metadata into the SVG
# -----------------------------------------