Added raw ASC_SOP line method

This commit is contained in:
2025-12-17 15:12:34 -08:00
parent 9ab3804c89
commit 28307608fc
3 changed files with 24 additions and 9 deletions

View File

@@ -177,6 +177,16 @@ class Edit:
return self._asc_sop_statement.cdl_sop
@property
def asc_sop_raw(self) -> Optional[str]:
"""
ASC CDL Slope-Offset-Power statement raw line
"""
if self._asc_sop_statement is None:
return None
return self._asc_sop_statement.line
@property
def asc_sat(self) -> Optional[float]:
"""

View File

@@ -121,12 +121,16 @@ def _parse_remark(line, line_number) -> object:
else:
try:
return StmtCdlSop(cdl_sop=AscSopComponents(
slope=Rgb(red=float(v[0][0]), green=float(v[0][1]),
return StmtCdlSop(line=line,
cdl_sop=AscSopComponents(
slope=Rgb(red=float(v[0][0]),
green=float(v[0][1]),
blue=float(v[0][2])),
offset=Rgb(red=float(v[1][0]), green=float(v[1][1]),
offset=Rgb(red=float(v[1][0]),
green=float(v[1][1]),
blue=float(v[1][2])),
power=Rgb(red=float(v[2][0]), green=float(v[2][1]),
power=Rgb(red=float(v[2][0]),
green=float(v[2][1]),
blue=float(v[2][2]))
),
line_number=line_number)

View File

@@ -50,6 +50,7 @@ class StmtSourceFile(NamedTuple):
class StmtCdlSop(NamedTuple):
line: str
cdl_sop: AscSopComponents[float]
line_number: int