class IfdLe(Structure): """IFD Segment (Little Endian)""" count: int = member(fmt=uint16_l, compute=True) # type: ignore tags: list = sized_member(size=count, fmt=ifd_tag_array_le, ratio=IfdTagLe.nbytes) # type: ignore next: int = member(fmt=uint32_l)
class Ifd(Structure): """IFD Segment""" count: int = member(fmt=uint16, compute=True) # type: ignore tags: list = sized_member(size=count, fmt=ifd_tag_array, ratio=IfdTag.nbytes) # type: ignore next: int = member(fmt=uint32)
class TiffHeader(Structure): """TIFF Header""" byte_order: int = member(fmt=tiff_byte_order) reserved: int = member(fmt=uint16) ifd_offset: int = member(fmt=BYTE_ORDER_MAP.__getitem__, fmt_arg=byte_order) # type: ignore
class IfdTagLe(Structure): """IFD Tag (Little Endian)""" tag_id: int = member(fmt=uint16_l) type: int = member(fmt=exif_type_le) value_count: int = member(fmt=uint32_l) value_offset: int = member(fmt=uint32_l)
class IfdTag(Structure): """IFD Tag""" tag_id: int = member(fmt=uint16) type: int = member(fmt=exif_type) value_count: int = member(fmt=uint32) value_offset: int = member(fmt=uint32)
class RationalDtypeLe(Structure): """RATIONAL Datatype (Little Endian)""" numerator: int = member(fmt=uint32_le) denominator: int = member(fmt=uint32_le)
class RationalDtype(Structure): """RATIONAL Datatype""" numerator: int = member(fmt=uint32) denominator: int = member(fmt=uint32)