MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / parse_args

Function parse_args

tools/make_highlight.py:108–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106
107
108def parse_args():
109 p = argparse.ArgumentParser(
110 description="Highlight a region and place a x2 zoomed inset at bottom-right."
111 )
112 p.add_argument(
113 "--input",
114 required=True,
115 help="Comma-separated list of input image paths (e.g. img1.png,img2.png).",
116 )
117 p.add_argument("--u", type=int, required=True, help="Left (x) of top-left corner.")
118 p.add_argument("--v", type=int, required=True, help="Top (y) of top-left corner.")
119 p.add_argument("--h", type=int, required=True, help="Height of the region.")
120 p.add_argument("--w", type=int, required=True, help="Width of the region.")
121 p.add_argument(
122 "--output",
123 required=False,
124 default=None,
125 help=(
126 "Optional output path for single-image runs. When omitted (or when processing"
127 " multiple inputs), results save as <input>_crop.<ext> alongside each source."
128 ),
129 )
130 p.add_argument(
131 "--thickness",
132 type=int,
133 default=4,
134 help="Rectangle line thickness (3-5 recommended).",
135 )
136 p.add_argument("--margin", type=int, default=16, help="Margin for inset placement.")
137 return p.parse_args()
138
139
140def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected