示例#1
0
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)
示例#2
0
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)
示例#3
0
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
示例#4
0
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)
示例#5
0
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)
示例#6
0
class RationalDtypeLe(Structure):
    """RATIONAL Datatype (Little Endian)"""

    numerator: int = member(fmt=uint32_le)
    denominator: int = member(fmt=uint32_le)
示例#7
0
class RationalDtype(Structure):
    """RATIONAL Datatype"""

    numerator: int = member(fmt=uint32)
    denominator: int = member(fmt=uint32)