Skip to content

Commit

Permalink
[#370] Fixed `DisplayCAL.profile_loader.ProfileLoader._check_display_…
Browse files Browse the repository at this point in the history
…conf()` for a `str` vs `bytes` error raised when the VCGT doesn't have exactly 256 entries.
  • Loading branch information
eoyilmaz committed Oct 9, 2024
1 parent f3f217a commit 7175ad4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DisplayCAL/profile_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2780,13 +2780,13 @@ def _check_display_conf(self):
)
)
# Fall back to linear calibration
tagData = "vcgt"
tagData += "\0" * 4 # Reserved
tagData += "\0\0\0\x01" # Formula type
tagData = b"vcgt"
tagData += b"\0" * 4 # Reserved
tagData += b"\0\0\0\x01" # Formula type
for channel in range(3):
tagData += "\0\x01\0\0" # Gamma 1.0
tagData += "\0" * 4 # Min 0.0
tagData += "\0\x01\0\0" # Max 1.0
tagData += b"\0\x01\0\0" # Gamma 1.0
tagData += b"\0" * 4 # Min 0.0
tagData += b"\0\x01\0\0" # Max 1.0
vcgt = ICCP.VideoCardGammaFormulaType(tagData, "vcgt")
vcgt_values = vcgt.get_values()[:3]
if self._reset_gamma_ramps:
Expand Down

0 comments on commit 7175ad4

Please sign in to comment.