File tree Expand file tree Collapse file tree 5 files changed +61
-0
lines changed
Expand file tree Collapse file tree 5 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ # from .exr_enum_base import *
2+ from .exr_compression_type import *
3+ from .exr_image_data_type import *
4+ from .exr_line_order_type import *
Original file line number Diff line number Diff line change 1+ """
2+ ref : https://openexr.com/en/latest/OpenEXRFileLayout.html?highlight=xsampling#predefined-attribute-types
3+ """
4+ from typing import Any
5+ from openexr_python .exr_enums .exr_enum_base import EXREnumBase
6+
7+
8+ class EXRCompressionType (EXREnumBase ):
9+ Compression_NO = 0
10+ Compression_RLE = 1
11+ Compression_ZIPS = 2
12+ Compression_ZIP = 3
13+ Compression_PIZ = 4
14+ Compression_PXR24 = 5
15+ Compression_B44 = 6
16+ Compression_B44A = 7
17+
18+ @classmethod
19+ def parse_raw2pyobj (cls , raw_compression : Any ):
20+ return EXRCompressionType (value = raw_compression .v )
Original file line number Diff line number Diff line change 1+ from enum import Enum
2+ from typing import Any , Type
3+ from abc import *
4+
5+
6+ class EXREnumBase (Enum , metaclass = ABCMeta ):
7+ pass
Original file line number Diff line number Diff line change 1+ """
2+ ref : https://openexr.com/en/latest/OpenEXRFileLayout.html?highlight=xsampling#predefined-attribute-types
3+ """
4+ from openexr_python .exr_enums .exr_enum_base import EXREnumBase
5+ from typing import Any
6+
7+
8+ class EXRImageDataType (EXREnumBase ):
9+ UINT32 = 0
10+ FLOAT16 = 1
11+ FLOAT32 = 2
12+
13+ @classmethod
14+ def parse_raw2pyobj (cls , raw_channel_info : Any ):
15+ return EXRImageDataType (value = raw_channel_info .type .v )
Original file line number Diff line number Diff line change 1+ """
2+ ref : https://openexr.com/en/latest/OpenEXRFileLayout.html?highlight=xsampling#predefined-attribute-types
3+ """
4+ from openexr_python .exr_enums .exr_enum_base import EXREnumBase
5+ from typing import Any
6+
7+
8+ class EXRLineOrderType (EXREnumBase ):
9+ Increasing_Y = 0
10+ Decreasing_Y = 1
11+ Random_Y = 2
12+
13+ @classmethod
14+ def parse_raw2pyobj (cls , raw_line_order : Any ):
15+ return EXRLineOrderType (value = raw_line_order .v )
You can’t perform that action at this time.
0 commit comments