You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://tokei.rs)
7
7
8
8
# EXRS
9
9
10
10
This library is a 100% Rust and 100% safe code library for
11
-
reading and writing OpenEXR images.
11
+
reading and writing OpenEXR images.
12
12
13
13
[OpenEXR](http://www.openexr.com/)
14
14
is the de-facto standard image format in animation, VFX, and
@@ -28,13 +28,13 @@ Features include:
28
28
29
29
### Current Status
30
30
31
-
This library has matured quite a bit, but should still be considered incomplete.
31
+
This library has matured quite a bit, but should still be considered incomplete.
32
32
For example, deep data and DWA compression algorithms are not supported yet.
33
33
34
34
If you encounter an exr file that cannot be opened by this crate but should be,
35
35
please leave an issue on this repository, containing the image file.
36
36
37
-
The focus is set on supporting all feature and correctness;
37
+
The focus is set on supporting all feature and correctness;
38
38
some performance optimizations are to be done.
39
39
40
40
__What we can do:__
@@ -44,7 +44,7 @@ __What we can do:__
44
44
-[x] multi-part images (multiple layers, like Photoshop)
45
45
-[x] multi-resolution images (mip maps, rip maps)
46
46
-[x] access meta data and raw pixel blocks independently
47
-
-[x] automatically crop away transparent pixels of an image (opt-in)
47
+
-[x] automatically crop away transparent pixels of an image (opt-in)
48
48
-[ ] channel subsampling
49
49
-[ ] deep data
50
50
-[x] compression methods
@@ -68,14 +68,14 @@ __What we can do:__
68
68
-[x] a full-fledged image data structure that can contain any exr image,
69
69
can open any image with a single function call (`read_all_data_from_file`)
70
70
without knowing anything about the file in advance
71
-
-[x] decompress and decompress image sections either
71
+
-[x] decompress and decompress image sections either
72
72
in parallel or with low memory overhead
73
73
-[x] read and write progress callback
74
74
-[x] write blocks streams, one after another
75
-
-[x] memory mapping automatically supported
75
+
-[x] memory mapping automatically supported
76
76
by using the generic `std::io::Read` and `std::io::Write` traits
77
77
78
-
78
+
79
79
<!-- detailed internal feature checklist:
80
80
- [x] Inspecting Metadata
81
81
- [x] Singlepart
@@ -97,7 +97,7 @@ __What we can do:__
97
97
- [x] Reading those with known types
98
98
- [x] Reading those with unknown types into a plain byte buffer
99
99
- [x] Nice API for preview attribute extraction
100
-
100
+
101
101
- [ ] Decompressing Pixel Data
102
102
- [x] Any LineOrder
103
103
- [x] Any Pixel Type (`f16`, `f32`, `u32`)
@@ -132,7 +132,7 @@ __What we can do:__
132
132
- [x] PXR24 (lossless for f16 and u32)
133
133
- [x] B44, B44A
134
134
- [ ] DWAA, DWAB
135
-
135
+
136
136
- [x] De/compressing multiple blocks in parallel
137
137
138
138
- [ ] Profiling and real optimization
@@ -149,27 +149,30 @@ __What we can do:__
149
149
- [x] Enforce minimum length of 1 for arrays
150
150
- [x] [Validate data_window matches data size when writing images] is not required because one is inferred from the other
151
151
- [x] Channel names and layer names must be unique
152
-
152
+
153
153
- [x] Explore different APIs
154
154
- [x] Let user decide how to store data
155
155
- [x] Loading Metadata and specific tiles or blocks separately
156
156
-->
157
-
157
+
158
158
159
159
### Usage
160
160
161
+
> [!TIP]
162
+
> If you want to use the newest version of `exrs` with an older Rust version, you can still do that, by forcing Rust to use a an older version of the `half` crate via `cargo update -p half --precise 2.2.1`, or downgrade all dependencies via `cargo +nightly -Zminimal-versions generate-lockfile`. `half 2.3.0` and higher have an MSRV above 1.61.
163
+
161
164
Add this to your `Cargo.toml`:
162
165
```toml
163
166
[dependencies]
164
167
exr = "1.71.0"
165
168
166
-
# also, optionally add this to your crate for smaller binary size
169
+
# also, optionally add this to your crate for smaller binary size
167
170
# and better runtime performance
168
171
[profile.release]
169
172
lto = true
170
173
```
171
174
172
-
The master branch of this repository always matches the `crates.io` version,
175
+
The master branch of this repository always matches the `crates.io` version,
173
176
so you could also link the github repository master branch.
174
177
175
178
### Example
@@ -216,8 +219,8 @@ Or read [the guide](https://github.com/johannesvollmer/exrs/tree/master/GUIDE.md
216
219
217
220
### Goals
218
221
219
-
`exrs` aims to provide a safe and convenient
220
-
interface to the OpenEXR file format. It is designed
222
+
`exrs` aims to provide a safe and convenient
223
+
interface to the OpenEXR file format. It is designed
221
224
to minimize the possibility of invalid files and runtime errors.
222
225
It contains a full-fledged image data structure that can contain any exr image,
223
226
but also grants access a low level block interface.
@@ -234,7 +237,7 @@ This library uses no unsafe code. In fact, this crate is annotated with `#[forbi
234
237
Some dependencies use unsafe code, though this is minimized by selecting dependencies carefully.
235
238
236
239
All information from a file is handled with caution.
237
-
Allocations have a safe maximum size that will not be exceeded at once,
240
+
Allocations have a safe maximum size that will not be exceeded at once,
238
241
to reduce memory exhaustion attacks.
239
242
240
243
### What I am proud of
@@ -272,7 +275,7 @@ and they offer several advantages over this Rust implementation:
272
275
273
276
### Specification
274
277
275
-
This library is modeled after the
278
+
This library is modeled after the
276
279
official [`OpenEXRFileLayout.pdf`](http://www.openexr.com/documentation.html)
277
280
document. Unspecified behavior is concluded from the C++ library.
278
281
@@ -300,4 +303,4 @@ Each command requires a running `docker` instance,
300
303
and `cross-rs` to be installed on your machine (`cargo install cross`).
301
304
- Mips (Big Endian) `cross test --target mips-unknown-linux-gnu --verbose`
302
305
303
-
To benchmark the library, simply run `cargo bench`.
306
+
To benchmark the library, simply run `cargo bench`.
0 commit comments