diff --git a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp index 2d829fff9a..1be3fff5d3 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.cpp @@ -468,6 +468,7 @@ private: } case Type::UnsignedShort: return read_every_values.template operator()(); + case Type::IFD: case Type::UnsignedLong: return read_every_values.template operator()(); case Type::UnsignedRational: diff --git a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.h b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.h index f5e896fc61..99a1245b58 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.h +++ b/Userland/Libraries/LibGfx/ImageFormats/TIFFLoader.h @@ -11,8 +11,12 @@ namespace Gfx { +// This is a link to the main TIFF specification from 1992 // https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf +// First TIFF Technical notes from 1995 +// https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf + namespace TIFF { class TIFFLoadingContext; } diff --git a/Userland/Libraries/LibGfx/TIFFGenerator.py b/Userland/Libraries/LibGfx/TIFFGenerator.py index ec8af2871d..cc7e757bc2 100755 --- a/Userland/Libraries/LibGfx/TIFFGenerator.py +++ b/Userland/Libraries/LibGfx/TIFFGenerator.py @@ -40,6 +40,7 @@ class TIFFType(EnumWithExportName): SignedRational = 10, 8 Float = 11, 4 Double = 12, 8 + IFD = 13, 4 UTF8 = 129, 1 @@ -218,7 +219,7 @@ def tiff_type_to_cpp(t: TIFFType, with_promotion: bool = True) -> str: return 'ByteBuffer' if t == TIFFType.UnsignedShort: return 'u16' - if t == TIFFType.UnsignedLong: + if t == TIFFType.UnsignedLong or t == TIFFType.IFD: return 'u32' if t == TIFFType.UnsignedRational: return 'TIFF::Rational'