From 796ece7b35db9d0f820dd0bd76bafc6cf1315d91 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Sat, 16 Dec 2023 20:33:39 -0500 Subject: [PATCH] LibGfx/TIFF: Read the ExtraSamples tag --- Userland/Libraries/LibGfx/TIFFGenerator.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Userland/Libraries/LibGfx/TIFFGenerator.py b/Userland/Libraries/LibGfx/TIFFGenerator.py index 199f4e5fb6..0d092444be 100755 --- a/Userland/Libraries/LibGfx/TIFFGenerator.py +++ b/Userland/Libraries/LibGfx/TIFFGenerator.py @@ -90,6 +90,12 @@ class SampleFormat(EnumWithExportName): Undefined = 4 +class ExtraSample(EnumWithExportName): + Unspecified = 0 + AssociatedAlpha = 1 + UnassociatedAlpha = 2 + + tag_fields = ['id', 'types', 'counts', 'default', 'name', 'associated_enum'] Tag = namedtuple( @@ -117,6 +123,7 @@ known_tags: List[Tag] = [ Tag('296', [TIFFType.UnsignedShort], [], ResolutionUnit.Inch, "ResolutionUnit", ResolutionUnit), Tag('339', [TIFFType.UnsignedShort], [], SampleFormat.Unsigned, "SampleFormat", SampleFormat), Tag('317', [TIFFType.UnsignedShort], [1], Predictor.NoPrediction, "Predictor", Predictor), + Tag('338', [TIFFType.UnsignedShort], [], None, "ExtraSamples", ExtraSample), Tag('34675', [TIFFType.Undefined], [], None, "ICCProfile"), ]