OpenEXR 3.5.3__cp315-cp315-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Imath.py +203 -0
- OpenEXR.cp315-win_arm64.pyd +0 -0
- openexr-3.5.3.data/platlib/msvcp140-9cb625fcbc2fbbd6fca1aee8b24b0ebe.dll +0 -0
- openexr-3.5.3.dist-info/DELVEWHEEL +2 -0
- openexr-3.5.3.dist-info/METADATA +261 -0
- openexr-3.5.3.dist-info/RECORD +8 -0
- openexr-3.5.3.dist-info/WHEEL +5 -0
- openexr-3.5.3.dist-info/licenses/LICENSE.md +11 -0
Imath.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
2
|
+
# Copyright (c) Contributors to the OpenEXR Project.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
:mod:`Imath` --- Deprecated component of OpenEXR
|
|
6
|
+
================================================
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
class chromaticity(object):
|
|
10
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
11
|
+
def __init__(self, x, y):
|
|
12
|
+
self.x = x
|
|
13
|
+
self.y = y
|
|
14
|
+
def __repr__(self):
|
|
15
|
+
return repr((self.x, self.y))
|
|
16
|
+
def __eq__(self, other):
|
|
17
|
+
return (self.x, self.y) == (other.x, other.y)
|
|
18
|
+
|
|
19
|
+
class point(object):
|
|
20
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
21
|
+
def __init__(self, x, y):
|
|
22
|
+
self.x = x;
|
|
23
|
+
self.y = y;
|
|
24
|
+
def __repr__(self):
|
|
25
|
+
return repr((self.x, self.y))
|
|
26
|
+
def __eq__(self, other):
|
|
27
|
+
return (self.x, self.y) == (other.x, other.y)
|
|
28
|
+
|
|
29
|
+
class V2i(point):
|
|
30
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
class V2f(point):
|
|
34
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
class Box:
|
|
38
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
39
|
+
def __init__(self, min = None, max = None):
|
|
40
|
+
self.min = min
|
|
41
|
+
self.max = max
|
|
42
|
+
def __repr__(self):
|
|
43
|
+
return repr(self.min) + " - " + repr(self.max)
|
|
44
|
+
def __eq__(self, other):
|
|
45
|
+
return (self.min, self.max) == (other.min, other.max)
|
|
46
|
+
|
|
47
|
+
class Box2i(Box):
|
|
48
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
class Box2f(Box):
|
|
52
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
class Chromaticities:
|
|
56
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
57
|
+
def __init__(self, red = None, green = None, blue = None, white = None):
|
|
58
|
+
self.red = red
|
|
59
|
+
self.green = green
|
|
60
|
+
self.blue = blue
|
|
61
|
+
self.white = white
|
|
62
|
+
def __repr__(self):
|
|
63
|
+
return repr(self.red) + " " + repr(self.green) + " " + repr(self.blue) + " " + repr(self.white)
|
|
64
|
+
|
|
65
|
+
class Enumerated(object):
|
|
66
|
+
def __init__(self, v):
|
|
67
|
+
if v in self.names:
|
|
68
|
+
self.v = eval("self." + v)
|
|
69
|
+
else:
|
|
70
|
+
self.v = v
|
|
71
|
+
def __repr__(self):
|
|
72
|
+
return self.names[self.v]
|
|
73
|
+
def __cmp__(self, other):
|
|
74
|
+
return self.v - other.v
|
|
75
|
+
def __eq__(self, other):
|
|
76
|
+
return self.v == other.v
|
|
77
|
+
|
|
78
|
+
class LineOrder(Enumerated):
|
|
79
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
80
|
+
INCREASING_Y = 0
|
|
81
|
+
DECREASING_Y = 1
|
|
82
|
+
RANDOM_Y = 2
|
|
83
|
+
names = ["INCREASING_Y", "DECREASING_Y", "RANDOM_Y"]
|
|
84
|
+
|
|
85
|
+
class Compression(Enumerated):
|
|
86
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
87
|
+
NO_COMPRESSION = 0
|
|
88
|
+
RLE_COMPRESSION = 1
|
|
89
|
+
ZIPS_COMPRESSION = 2
|
|
90
|
+
ZIP_COMPRESSION = 3
|
|
91
|
+
PIZ_COMPRESSION = 4
|
|
92
|
+
PXR24_COMPRESSION = 5
|
|
93
|
+
B44_COMPRESSION = 6
|
|
94
|
+
B44A_COMPRESSION = 7
|
|
95
|
+
DWAA_COMPRESSION = 8
|
|
96
|
+
DWAB_COMPRESSION = 9
|
|
97
|
+
HTJ2K256_COMPRESSION = 10
|
|
98
|
+
HTJ2K32_COMPRESSION = 11
|
|
99
|
+
LJ2K_COMPRESSION = 12
|
|
100
|
+
names = [
|
|
101
|
+
"NO_COMPRESSION", "RLE_COMPRESSION", "ZIPS_COMPRESSION", "ZIP_COMPRESSION", "PIZ_COMPRESSION", "PXR24_COMPRESSION",
|
|
102
|
+
"B44_COMPRESSION", "B44A_COMPRESSION", "DWAA_COMPRESSION", "DWAB_COMPRESSION", "HTJ2K256_COMPRESSION", "HTJ2K32_COMPRESSION",
|
|
103
|
+
"LJ2K_COMPRESSION"
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
class PixelType(Enumerated):
|
|
107
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
108
|
+
UINT = 0
|
|
109
|
+
HALF = 1
|
|
110
|
+
FLOAT = 2
|
|
111
|
+
names = ["UINT", "HALF", "FLOAT"]
|
|
112
|
+
|
|
113
|
+
class Channel:
|
|
114
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
115
|
+
def __init__(self, type = PixelType(PixelType.HALF), xSampling = 1, ySampling = 1):
|
|
116
|
+
self.type = type
|
|
117
|
+
self.xSampling = xSampling
|
|
118
|
+
self.ySampling = ySampling
|
|
119
|
+
if not isinstance(self.type, PixelType):
|
|
120
|
+
raise TypeError("type needs to be a PixelType.")
|
|
121
|
+
def __repr__(self):
|
|
122
|
+
return repr(self.type) + " " + repr((self.xSampling, self.ySampling))
|
|
123
|
+
def __eq__(self, other):
|
|
124
|
+
return (self.type, self.xSampling, self.ySampling) == (other.type, other.xSampling, other.ySampling)
|
|
125
|
+
|
|
126
|
+
class Rational(object):
|
|
127
|
+
def __init__(self, n, d):
|
|
128
|
+
self.n = n
|
|
129
|
+
self.d = d
|
|
130
|
+
def __repr__(self):
|
|
131
|
+
return repr("%s/%s (%.3f)" % (self.n, self.d, self.n/float(self.d)))
|
|
132
|
+
def __eq__(self, other):
|
|
133
|
+
return self.n == other.n and self.d == other.d
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class TimeCode:
|
|
137
|
+
def __init__(self, hours, minutes, seconds, frame, dropFrame=False, colorFrame=False, fieldPhase=False, bgf0=False, bgf1=False, bgf2=False, binaryGroup1=0, binaryGroup2=0, binaryGroup3=0, binaryGroup4=0, binaryGroup5=0, binaryGroup6=0, binaryGroup7=0, binaryGroup8=0):
|
|
138
|
+
self.hours = hours
|
|
139
|
+
self.minutes = minutes
|
|
140
|
+
self.seconds = seconds
|
|
141
|
+
self.frame = frame
|
|
142
|
+
self.dropFrame = dropFrame
|
|
143
|
+
self.colorFrame = colorFrame
|
|
144
|
+
self.fieldPhase = fieldPhase
|
|
145
|
+
self.bgf0 = bgf0
|
|
146
|
+
self.bgf1 = bgf1
|
|
147
|
+
self.bgf2 = bgf2
|
|
148
|
+
self.binaryGroup1 = binaryGroup1
|
|
149
|
+
self.binaryGroup2 = binaryGroup2
|
|
150
|
+
self.binaryGroup3 = binaryGroup3
|
|
151
|
+
self.binaryGroup4 = binaryGroup4
|
|
152
|
+
self.binaryGroup5 = binaryGroup5
|
|
153
|
+
self.binaryGroup6 = binaryGroup6
|
|
154
|
+
self.binaryGroup7 = binaryGroup7
|
|
155
|
+
self.binaryGroup8 = binaryGroup8
|
|
156
|
+
|
|
157
|
+
def __repr__(self):
|
|
158
|
+
# ignoring binaryGroups for now
|
|
159
|
+
return "<Imath.TimeCode instance { time: %s:%s:%s:%s, dropFrame: %s, colorFrame: %s, fieldPhase: %s, bgf0: %s, bgf1: %s, bgf2: %s }" % (self.hours, self.minutes, self.seconds, self.frame, self.dropFrame, self.colorFrame, self.fieldPhase, self.bgf0, self.bgf1, self.bgf2)
|
|
160
|
+
|
|
161
|
+
def __eq__(self, other):
|
|
162
|
+
return self.__dict__ == other.__dict__
|
|
163
|
+
|
|
164
|
+
class KeyCode:
|
|
165
|
+
def __init__(self, filmMfcCode=0, filmType=0, prefix=0, count=0, perfOffset=0, perfsPerFrame=4, perfsPerCount=64):
|
|
166
|
+
self.filmMfcCode = filmMfcCode
|
|
167
|
+
self.filmType = filmType
|
|
168
|
+
self.prefix = prefix
|
|
169
|
+
self.count = count
|
|
170
|
+
self.perfOffset = perfOffset
|
|
171
|
+
self.perfsPerFrame = perfsPerFrame
|
|
172
|
+
self.perfsPerCount = perfsPerCount
|
|
173
|
+
def __repr__(self):
|
|
174
|
+
return "<Imath.KeyCode instance { filmMfcCode: %s, filmType: %s, prefix: %s, count: %s, perfOffset: %s, perfsPerFrame: %s, perfsPerCount: %s }" % (self.filmMfcCode, self.filmType, self.prefix, self.count, self.perfOffset, self.perfsPerFrame, self.perfsPerCount)
|
|
175
|
+
|
|
176
|
+
def __eq__(self, other):
|
|
177
|
+
return self.__dict__ == other.__dict__
|
|
178
|
+
|
|
179
|
+
class PreviewImage:
|
|
180
|
+
"""This class is deprecated and will be removed in a future release"""
|
|
181
|
+
|
|
182
|
+
class LevelMode(Enumerated):
|
|
183
|
+
ONE_LEVEL = 0
|
|
184
|
+
MIPMAP_LEVELS = 1
|
|
185
|
+
RIPMAP_LEVELS = 2
|
|
186
|
+
names = ["ONE_LEVEL", "MIPMAP_LEVELS", "RIPMAP_LEVELS"]
|
|
187
|
+
|
|
188
|
+
class LevelRoundingMode(Enumerated):
|
|
189
|
+
ROUND_DOWN = 0
|
|
190
|
+
ROUND_UP = 1
|
|
191
|
+
names = ["ROUND_DOWN", "ROUND_UP"]
|
|
192
|
+
|
|
193
|
+
class TileDescription:
|
|
194
|
+
def __init__(self, xs = 32, ys = 32, m = LevelMode(LevelMode.ONE_LEVEL), r =LevelRoundingMode(LevelRoundingMode.ROUND_DOWN)):
|
|
195
|
+
self.xSize = xs
|
|
196
|
+
self.ySize = ys
|
|
197
|
+
self.mode = m
|
|
198
|
+
self.roundingMode = r
|
|
199
|
+
def __repr__(self):
|
|
200
|
+
return "<Imath.TileDescription instance { xSize: %s, ySize: %s, mode: %s, roundingMode: %s>" % (self.xSize, self.ySize, repr(self.mode), repr(self.roundingMode))
|
|
201
|
+
def __eq__(self, other):
|
|
202
|
+
return self.__dict__ == other.__dict__
|
|
203
|
+
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.13.2
|
|
2
|
+
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-hij1fq_6\\cp315-win_arm64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-hij1fq_6\\cp315-win_arm64\\repaired_wheel', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-hij1fq_6\\cp315-win_arm64\\built_wheel\\openexr-3.5.3-cp315-cp315-win_arm64.whl']
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: OpenEXR
|
|
3
|
+
Version: 3.5.3
|
|
4
|
+
Summary: Python bindings for the OpenEXR image file format
|
|
5
|
+
Author-Email: Contributors to the OpenEXR project <info@openexr.com>
|
|
6
|
+
Project-URL: Homepage, https://openexr.com
|
|
7
|
+
Project-URL: Source, https://github.com/AcademySoftwareFoundation/OpenEXR
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/AcademySoftwareFoundation/OpenEXR/issues
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Requires-Dist: numpy>=1.7.0
|
|
11
|
+
Provides-Extra: test
|
|
12
|
+
Requires-Dist: pytest; extra == "test"
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
<!-- SPDX-License-Identifier: BSD-3-Clause -->
|
|
16
|
+
<!-- Copyright (c) Contributors to the OpenEXR Project -->
|
|
17
|
+
|
|
18
|
+
[](https://github.com/AcademySoftwareFoundation/openexr/blob/main/LICENSE.md)
|
|
19
|
+
[](https://bestpractices.coreinfrastructure.org/projects/2799)
|
|
20
|
+
[](https://securityscorecards.dev/viewer/?uri=github.com/AcademySoftwareFoundation/openexr)
|
|
21
|
+
[](https://github.com/AcademySoftwareFoundation/openexr/actions?query=workflow%3ACI)
|
|
22
|
+
[](https://github.com/AcademySoftwareFoundation/openexr/actions?query=workflow%3AAnalysis)
|
|
23
|
+
[](https://sonarcloud.io/dashboard?id=AcademySoftwareFoundation_openexr)
|
|
24
|
+
|
|
25
|
+
# OpenEXR
|
|
26
|
+
|
|
27
|
+
OpenEXR provides the specification and reference implementation of the
|
|
28
|
+
EXR file format, the professional-grade image storage format of the
|
|
29
|
+
motion picture industry.
|
|
30
|
+
|
|
31
|
+
The purpose of EXR format is to accurately and efficiently represent
|
|
32
|
+
high-dynamic-range scene-linear image data and associated metadata,
|
|
33
|
+
with strong support for multi-part, multi-channel use cases.
|
|
34
|
+
|
|
35
|
+
OpenEXR is widely used in host application software where accuracy is
|
|
36
|
+
critical, such as photorealistic rendering, texture access, image
|
|
37
|
+
compositing, deep compositing, and DI.
|
|
38
|
+
|
|
39
|
+
## OpenEXR Project Mission
|
|
40
|
+
|
|
41
|
+
The goal of the OpenEXR project is to keep the EXR format reliable and
|
|
42
|
+
modern and to maintain its place as the preferred image format for
|
|
43
|
+
entertainment content creation.
|
|
44
|
+
|
|
45
|
+
Major revisions are infrequent, and new features will be carefully
|
|
46
|
+
weighed against increased complexity. The principal priorities of the
|
|
47
|
+
project are:
|
|
48
|
+
|
|
49
|
+
* Robustness, reliability, security
|
|
50
|
+
* Backwards compatibility, data longevity
|
|
51
|
+
* Performance - read/write/compression/decompression time
|
|
52
|
+
* Simplicity, ease of use, maintainability
|
|
53
|
+
* Wide adoption, multi-platform support - Linux, Windows, macOS, and others
|
|
54
|
+
|
|
55
|
+
OpenEXR is intended solely for 2D data. It is not appropriate for
|
|
56
|
+
storage of volumetric data, cached or lit 3D scenes, or more complex
|
|
57
|
+
3D data such as light fields.
|
|
58
|
+
|
|
59
|
+
The goals of the Imath project are simplicity, ease of use,
|
|
60
|
+
correctness and verifiability, and breadth of adoption. Imath is not
|
|
61
|
+
intended to be a comprehensive linear algebra or numerical analysis
|
|
62
|
+
package.
|
|
63
|
+
|
|
64
|
+
## Python Module
|
|
65
|
+
|
|
66
|
+
The OpenEXR python module provides full support for reading and
|
|
67
|
+
writing all types of ``.exr`` image files, including scanline, tiled,
|
|
68
|
+
deep, mult-part, multi-view, and multi-resolution images with pixel
|
|
69
|
+
types of unsigned 32-bit integers and 16- and 32-bit floats. It
|
|
70
|
+
provides access to pixel data through numpy arrays, as either one
|
|
71
|
+
array per channel or with R, G, B, and A interleaved into a single
|
|
72
|
+
array RGBA array.
|
|
73
|
+
|
|
74
|
+
## Project Governance
|
|
75
|
+
|
|
76
|
+
OpenEXR is a project of the [Academy Software
|
|
77
|
+
Foundation](https://www.aswf.io). See the project's [governance
|
|
78
|
+
policies](https://github.com/AcademySoftwareFoundation/openexr/blob/main/GOVERNANCE.md), [contribution guidelines](https://github.com/AcademySoftwareFoundation/openexr/blob/main/CONTRIBUTING.md), and [code of conduct](https://github.com/AcademySoftwareFoundation/openexr/blob/main/CODE_OF_CONDUCT.md)
|
|
79
|
+
for more information.
|
|
80
|
+
|
|
81
|
+
# Quick Start
|
|
82
|
+
|
|
83
|
+
The "Hello, World" image writer:
|
|
84
|
+
|
|
85
|
+
# Generate a 3D NumPy array for RGB channels with random values
|
|
86
|
+
height, width = (20, 10)
|
|
87
|
+
RGB = np.random.rand(height, width, 3).astype('f')
|
|
88
|
+
|
|
89
|
+
channels = { "RGB" : RGB }
|
|
90
|
+
header = { "compression" : OpenEXR.ZIP_COMPRESSION,
|
|
91
|
+
"type" : OpenEXR.scanlineimage }
|
|
92
|
+
|
|
93
|
+
with OpenEXR.File(header, channels) as outfile:
|
|
94
|
+
outfile.write("readme.exr")
|
|
95
|
+
|
|
96
|
+
Or alternatively, construct the same output file via separate pixel arrays
|
|
97
|
+
for each channel:
|
|
98
|
+
|
|
99
|
+
# Generate arrays for R, G, and B channels with random values
|
|
100
|
+
height, width = (20, 10)
|
|
101
|
+
R = np.random.rand(height, width).astype('f')
|
|
102
|
+
G = np.random.rand(height, width).astype('f')
|
|
103
|
+
B = np.random.rand(height, width).astype('f')
|
|
104
|
+
channels = { "R" : R, "G" : G, "B" : B }
|
|
105
|
+
header = { "compression" : OpenEXR.ZIP_COMPRESSION,
|
|
106
|
+
"type" : OpenEXR.scanlineimage }
|
|
107
|
+
|
|
108
|
+
with OpenEXR.File(header, channels) as outfile:
|
|
109
|
+
outfile.write("readme.exr")
|
|
110
|
+
|
|
111
|
+
The corresponding example of reading an image is:
|
|
112
|
+
|
|
113
|
+
with OpenEXR.File("readme.exr") as infile:
|
|
114
|
+
|
|
115
|
+
RGB = infile.channels()["RGB"].pixels
|
|
116
|
+
height, width, _ = RGB.shape
|
|
117
|
+
for y in range(height):
|
|
118
|
+
for x in range(width):
|
|
119
|
+
pixel = tuple(RGB[y, x])
|
|
120
|
+
print(f"pixel[{y}][{x}]={pixel}")
|
|
121
|
+
|
|
122
|
+
Or alternatively, read the data as separate arrays for each channel:
|
|
123
|
+
|
|
124
|
+
with OpenEXR.File("readme.exr", separate_channels=True) as infile:
|
|
125
|
+
|
|
126
|
+
header = infile.header()
|
|
127
|
+
print(f"type={header['type']}")
|
|
128
|
+
print(f"compression={header['compression']}")
|
|
129
|
+
|
|
130
|
+
R = infile.channels()["R"].pixels
|
|
131
|
+
G = infile.channels()["G"].pixels
|
|
132
|
+
B = infile.channels()["B"].pixels
|
|
133
|
+
height, width = R.shape
|
|
134
|
+
for y in range(height):
|
|
135
|
+
for x in range(width):
|
|
136
|
+
pixel = (R[y, x], G[y, x], B[y, x])
|
|
137
|
+
print(f"pixel[{y}][{x}]={pixel}")
|
|
138
|
+
|
|
139
|
+
To modify the header metadata in a file:
|
|
140
|
+
|
|
141
|
+
with OpenEXR.File("readme.exr") as f:
|
|
142
|
+
|
|
143
|
+
f.header()["displayWindow"] = ((3,4),(5,6))
|
|
144
|
+
f.header()["screenWindowCenter"] = np.array([1.0,2.0],'float32')
|
|
145
|
+
f.header()["comments"] = "test image"
|
|
146
|
+
f.header()["longitude"] = -122.5
|
|
147
|
+
f.write("readme_modified.exr")
|
|
148
|
+
|
|
149
|
+
with OpenEXR.File("readme_modified.exr") as o:
|
|
150
|
+
dw = o.header()["displayWindow"]
|
|
151
|
+
assert (tuple(dw[0]), tuple(dw[1])) == ((3,4),(5,6))
|
|
152
|
+
swc = o.header()["screenWindowCenter"]
|
|
153
|
+
assert tuple(swc) == (1.0, 2.0)
|
|
154
|
+
assert o.header()["comments"] == "test image"
|
|
155
|
+
assert o.header()["longitude"] == -122.5
|
|
156
|
+
|
|
157
|
+
Note that OpenEXR's Imath-based vector and matrix attribute values
|
|
158
|
+
appear in the header dictionary as 2-element, 3-element, 3x3, 4x4
|
|
159
|
+
numpy arrays, and bounding boxes appear as tuples of 2-element arrays,
|
|
160
|
+
or tuples for convenience.
|
|
161
|
+
|
|
162
|
+
To read and write a multi-part file, use a list of ``Part`` objects:
|
|
163
|
+
|
|
164
|
+
height, width = (20, 10)
|
|
165
|
+
Z0 = np.zeros((height, width), dtype='f')
|
|
166
|
+
Z1 = np.ones((height, width), dtype='f')
|
|
167
|
+
|
|
168
|
+
P0 = OpenEXR.Part({}, {"Z" : Z0 })
|
|
169
|
+
P1 = OpenEXR.Part({}, {"Z" : Z1 })
|
|
170
|
+
|
|
171
|
+
f = OpenEXR.File([P0, P1])
|
|
172
|
+
f.write("readme_2part.exr")
|
|
173
|
+
|
|
174
|
+
with OpenEXR.File("readme_2part.exr") as o:
|
|
175
|
+
assert o.parts[0].name() == "Part0"
|
|
176
|
+
assert o.parts[0].width() == 10
|
|
177
|
+
assert o.parts[0].height() == 20
|
|
178
|
+
assert o.parts[1].name() == "Part1"
|
|
179
|
+
assert o.parts[1].width() == 10
|
|
180
|
+
assert o.parts[1].height() == 20
|
|
181
|
+
|
|
182
|
+
Deep data is stored in a numpy array whose entries are numpy
|
|
183
|
+
arrays. Construct a numpy array with a ``dtype`` of ``object``, and
|
|
184
|
+
assign each entry a numpy array holding the samples. Each pixel can
|
|
185
|
+
have a different number of samples, including ``None`` for no data,
|
|
186
|
+
but all channels in a given part must have the same number of samples.
|
|
187
|
+
|
|
188
|
+
height, width = (20, 10)
|
|
189
|
+
|
|
190
|
+
Z = np.empty((height, width), dtype=object)
|
|
191
|
+
for y in range(height):
|
|
192
|
+
for x in range(width):
|
|
193
|
+
Z[y, x] = np.array([y*width+x], dtype='uint32')
|
|
194
|
+
|
|
195
|
+
channels = { "Z" : Z }
|
|
196
|
+
header = { "compression" : OpenEXR.ZIPS_COMPRESSION,
|
|
197
|
+
"type" : OpenEXR.deepscanline }
|
|
198
|
+
with OpenEXR.File(header, channels) as outfile:
|
|
199
|
+
outfile.write("readme_test_tiled_deep.exr")
|
|
200
|
+
|
|
201
|
+
To read a deep file:
|
|
202
|
+
|
|
203
|
+
with OpenEXR.File("readme_test_tiled_deep.exr") as infile:
|
|
204
|
+
|
|
205
|
+
Z = infile.channels()["Z"].pixels
|
|
206
|
+
height, width = Z.shape
|
|
207
|
+
for y in range(height):
|
|
208
|
+
for x in range(width):
|
|
209
|
+
for z in Z[y,x]:
|
|
210
|
+
print(f"deep sample at {y},{x}: {z}")
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
# Community
|
|
214
|
+
|
|
215
|
+
* **Ask a question:**
|
|
216
|
+
|
|
217
|
+
- Email: openexr-dev@lists.aswf.io
|
|
218
|
+
|
|
219
|
+
- Slack: [academysoftwarefdn#openexr](https://academysoftwarefdn.slack.com/archives/CMLRW4N73)
|
|
220
|
+
|
|
221
|
+
* **Attend a meeting:**
|
|
222
|
+
|
|
223
|
+
- Technical Steering Committee meetings are open to the
|
|
224
|
+
public, fortnightly on Thursdays, 1:30pm Pacific Time.
|
|
225
|
+
|
|
226
|
+
- Calendar: https://zoom-lfx.platform.linuxfoundation.org/meetings/openexr
|
|
227
|
+
|
|
228
|
+
- Meeting notes: https://wiki.aswf.io/display/OEXR/TSC+Meetings
|
|
229
|
+
|
|
230
|
+
* **Report a bug:**
|
|
231
|
+
|
|
232
|
+
- Submit an Issue: https://github.com/AcademySoftwareFoundation/openexr/issues
|
|
233
|
+
|
|
234
|
+
* **Report a security vulnerability:**
|
|
235
|
+
|
|
236
|
+
- Email to security@openexr.com
|
|
237
|
+
|
|
238
|
+
* **Contribute a Fix, Feature, or Improvement:**
|
|
239
|
+
|
|
240
|
+
- Read the [Contribution Guidelines](https://github.com/AcademySoftwareFoundation/openexr/blob/main/CONTRIBUTING.md) and [Code of Conduct](https://github.com/AcademySoftwareFoundation/openexr/blob/main/CODE_OF_CONDUCT.md)
|
|
241
|
+
|
|
242
|
+
- Sign the [Contributor License
|
|
243
|
+
Agreement](https://contributor.easycla.lfx.linuxfoundation.org/#/cla/project/2e8710cb-e379-4116-a9ba-964f83618cc5/user/564e571e-12d7-4857-abd4-898939accdd7)
|
|
244
|
+
|
|
245
|
+
- Submit a Pull Request: https://github.com/AcademySoftwareFoundation/openexr/pulls
|
|
246
|
+
|
|
247
|
+
# Resources
|
|
248
|
+
|
|
249
|
+
- Website: http://www.openexr.com
|
|
250
|
+
- Technical documentation: https://openexr.readthedocs.io
|
|
251
|
+
- Porting help: [OpenEXR/Imath Version 2.x to 3.x Porting Guide](https://openexr.readthedocs.io/en/latest/PortingGuide.html)
|
|
252
|
+
- Reference images: https://github.com/AcademySoftwareFoundation/openexr-images
|
|
253
|
+
- Security policy: [SECURITY.md](https://github.com/AcademySoftwareFoundation/openexr/blob/main/SECURITY.md)
|
|
254
|
+
- Release notes: [CHANGES.md](https://github.com/AcademySoftwareFoundation/openexr/blob/main/CHANGES.md)
|
|
255
|
+
- Contributors: [CONTRIBUTORS.md](https://github.com/AcademySoftwareFoundation/openexr/blob/main/CONTRIBUTORS.md)
|
|
256
|
+
|
|
257
|
+
# License
|
|
258
|
+
|
|
259
|
+
OpenEXR is licensed under the [BSD-3-Clause license](https://github.com/AcademySoftwareFoundation/openexr/blob/main/LICENSE.md).
|
|
260
|
+
|
|
261
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Imath.py,sha256=puYIfjb9LQjYWoilcjfU6Lx3HLqUl7DybUm4p6-Tjoo,7579
|
|
2
|
+
OpenEXR.cp315-win_arm64.pyd,sha256=y1BUtrfqherP-HpX_ZQDfyYTBbjiFS28RQD7fMyDdYc,2632192
|
|
3
|
+
openexr-3.5.3.data/platlib/msvcp140-9cb625fcbc2fbbd6fca1aee8b24b0ebe.dll,sha256=nLYl_Lwvu9b8oa7osksOvo-yI6PHpnKlWhfAcvZ7FG0,1376296
|
|
4
|
+
openexr-3.5.3.dist-info/DELVEWHEEL,sha256=qWBnAMU7YX0D6UDLCW5GO_zFBhCSQt6KRyJSxkWaDNM,406
|
|
5
|
+
openexr-3.5.3.dist-info/METADATA,sha256=yDICjck6jTqNYza0CnD65fONjQn7prI_ShcKfGdmxgg,10759
|
|
6
|
+
openexr-3.5.3.dist-info/RECORD,,
|
|
7
|
+
openexr-3.5.3.dist-info/WHEEL,sha256=SKh5BrH4AnbIriUZ4DsTmTbik_MgyU_WCXLf3hzXMDc,105
|
|
8
|
+
openexr-3.5.3.dist-info/licenses/LICENSE.md,sha256=prs6qYcKaH8Hjx6zJiPhUU3SI3A_x6GlZJB7M1pc0Oc,1512
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright (c) Contributors to the OpenEXR Project. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
4
|
+
|
|
5
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
6
|
+
|
|
7
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
+
|
|
9
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
10
|
+
|
|
11
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|