Skip to content

Commit 5aa723f

Browse files
Merge pull request #142 from johannesvollmer/fix-int-rect-#141
Fix int rect #141
2 parents c27abd1 + 6663a06 commit 5aa723f

12 files changed

+332
-80
lines changed

Cargo.lock

+20-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = "Read and write OpenEXR files without any unsafe code"
44
keywords = ["exr", "openexr", "file", "binary", "io"]
55
categories = ["encoding", "filesystem", "graphics", "multimedia"]
66

7-
version = "1.3.0"
7+
version = "1.4.0"
88
edition = "2018"
99
authors = ["johannesvollmer <[email protected]>"]
1010

@@ -26,21 +26,21 @@ plugin = false
2626
proc-macro = false
2727

2828
[dependencies]
29-
lebe = "0.5.1" # generic binary serialization
30-
half = "1.7.1" # 16 bit float pixel data type
31-
bit_field = "0.10.1" # exr file version bit flags
32-
deflate = "0.9.1" # DEFLATE compression
33-
inflate = "0.4.5" # DEFLATE decompression
34-
smallvec = "1.6.1" # make cache-friendly allocations TODO profile if smallvec is really an improvement!
35-
threadpool = "1.8.1" # threading for parallel compression TODO make this an optional feature?
36-
flume = "0.10.5" # crossbeam, but less unsafe code TODO make this an optional feature?
29+
lebe = "^0.5.1" # generic binary serialization
30+
half = "^1.8.2" # 16 bit float pixel data type
31+
bit_field = "^0.10.1" # exr file version bit flags
32+
deflate = "^1.0.0" # DEFLATE compression
33+
inflate = "^0.4.5" # DEFLATE decompression
34+
smallvec = "^1.7.0" # make cache-friendly allocations TODO profile if smallvec is really an improvement!
35+
threadpool = "^1.8.1" # threading for parallel compression TODO make this an optional feature?
36+
flume = "^0.10.9" # crossbeam, but less unsafe code TODO make this an optional feature?
3737

3838
[dev-dependencies]
3939
image = { version = "0.23.14", features = ["png"] } # used to convert one exr to some pngs
4040

4141
bencher = "0.1.5"
4242
walkdir = "2.3.2" # automatically test things for all files in a directory
43-
rand = "0.8.3" # used for fuzz testing
43+
rand = "0.8.4" # used for fuzz testing
4444
rayon = "1.5.1" # run tests for many files in parallel
4545

4646

GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ The samples can currently only be `FlatSamples` or `Levels<FlatSamples>`, and in
522522
### Samples
523523
Currently, only flat samples are supported. These do not contain deep data.
524524
Construct flat samples directly using `FlatSamples::F16(samples_vec)`, `FlatSamples::F32(samples_vec)`, or `FlatSamples::U32(samples_vec)`.
525-
The vector contains all samples of the layer, row by row (bottom up), from left to right.
525+
The vector contains all samples of the layer, row by row (from top to bottom), from left to right.
526526

527527
### Levels
528528
Optionally include Mip Maps or Rip Maps.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ __Big-endian code is not yet fully implemented. Help wanted.__
161161
Add this to your `Cargo.toml`:
162162
```toml
163163
[dependencies]
164-
exr = "1.3.0"
164+
exr = "1.4.0"
165165

166166
# also, optionally add this to your crate for smaller binary size
167167
# and better runtime performance

examples/4_specific_read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() {
4141
let (alpha, luma, luma_right) = layer.channel_data.pixels.first().unwrap().first().unwrap();
4242

4343
println!(
44-
"bottom left color of layer `{}`: (a, y, yr) = {:?}",
44+
"top left color of layer `{}`: (a, y, yr) = {:?}",
4545
layer.attributes.layer_name.clone().unwrap_or_default(),
4646
(alpha.to_f32(), luma, luma_right)
4747
)

examples/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
These are examples that demonstrate how to use `exrs`.
44

55
The examples for any specific `exrs` version can be found on the `docs.rs` page:
6+
- [docs.rs/crate/exr/1.4.0/source/examples/](https://docs.rs/crate/exr/1.4.0/source/examples/)
67
- [docs.rs/crate/exr/1.3.0/source/examples/](https://docs.rs/crate/exr/1.3.0/source/examples/)
78
- [docs.rs/crate/exr/1.2.0/source/examples/](https://docs.rs/crate/exr/1.2.0/source/examples/)
89
- [docs.rs/crate/exr/1.1.0/source/examples/](https://docs.rs/crate/exr/1.1.0/source/examples/)

releasing.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Yanking shouldn't be the default.
1818
1. ensure `#![warn(missing_docs)]` in `lib.rs`
1919
1. Example in README.md should be up-to-date
2020
1. GUIDE.md should be up-to-date
21+
1. Update Dependencies while you're at it?
2122

2223
## Tasks
2324
1. Bump version in

src/block/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ pub struct BlockIndex {
3636
/// Index of the layer.
3737
pub layer: usize,
3838

39-
/// Index of the bottom left pixel from the block within the data window.
39+
/// Index of the top left pixel from the block within the data window.
4040
pub pixel_position: Vec2<usize>,
4141

42-
/// Number of pixels in this block. Stays the same across all resolution levels.
42+
/// Number of pixels in this block, extending to the right and downwards.
43+
/// Stays the same across all resolution levels.
4344
pub pixel_size: Vec2<usize>,
4445

4546
/// Index of the mip or rip level in the image.

0 commit comments

Comments
 (0)