mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibGfx/TIFF: Add support for the IFD type
As described in the first edition of the TIFF technical notes, the IFD type is identical to Long (UnsignedLong) except that it only contains offset of valid IFDs. https://www.awaresystems.be/imaging/tiff/specification/TIFFPM6.pdf
This commit is contained in:
parent
1de90bf55e
commit
1d0a762cdb
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/LucasChollet
Commit: 1d0a762cdb
Pull-request: https://github.com/SerenityOS/serenity/pull/22711
Reviewed-by: https://github.com/gmta ✅
3 changed files with 7 additions and 1 deletions
|
@ -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<u32>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue