Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: signed strides #614

Open
claudeha opened this issue Nov 18, 2019 · 3 comments · May be fixed by #1324
Open

feature request: signed strides #614

claudeha opened this issue Nov 18, 2019 · 3 comments · May be fixed by #1324
Labels
Awaiting Feedback The issue is waiting for someone to respond. Feature Request A suggested change or addition of functionality to the library.
Milestone

Comments

@claudeha
Copy link

Frame buffer slice strides are non-negative as per:
https://github.com/openexr/openexr/blob/d778a0b47b18fe1ede3824fe013cea9dd7404360/OpenEXR/IlmImf/ImfFrameBuffer.h#L98-L99

Negative strides could be useful for flipping images at I/O time.

Would it be possible to change size_t to ssize_t at the next ABI-break-point?

@cary-ilm
Copy link
Member

The TSC discussed this. It's a useful feature, implemented in other places like OIIO.

If you would entertaining making the change, we'd happily review it and consider incorporating it.

The change will require careful testing, so besides just changing the type, the test suite should include tests that validate the behavior.

@fnordware
Copy link
Contributor

The type should probably be ptrdiff_t, right?

@cary-ilm cary-ilm added the Feature Request A suggested change or addition of functionality to the library. label Feb 7, 2020
@cary-ilm cary-ilm added this to the Backlog milestone Feb 7, 2020
@cary-ilm
Copy link
Member

We're planning a 3.0 release for later in August. If anyone from the community would like to submit a PR that address this (with sufficient testing), now would be a good time to consider including it.

@cary-ilm cary-ilm added the Awaiting Feedback The issue is waiting for someone to respond. label Jul 16, 2020
huww98 added a commit to huww98/openexr that referenced this issue Jan 13, 2023
Add support for negative stride to FrameBuffer Slice.

Change data type of stride from size_t to ptrdiff_t.

Add support for negative stride in `copyIntoFrameBuffer` and `copyFromFrameBuffer`.

Add a new `testNegativeStride` test.

Fixes: AcademySoftwareFoundation#614
Signed-off-by: 胡玮文 <[email protected]>
huww98 added a commit to huww98/openexr that referenced this issue Jan 13, 2023
Add support for negative stride to FrameBuffer Slice.

Change data type of stride from size_t to ptrdiff_t.

Add support for negative stride in `copyIntoFrameBuffer` and `copyFromFrameBuffer`.

Add a new `testNegativeStride` test.

Fixes: AcademySoftwareFoundation#614
Signed-off-by: 胡玮文 <[email protected]>
@huww98 huww98 linked a pull request Jan 13, 2023 that will close this issue
huww98 added a commit to huww98/openexr that referenced this issue Jan 13, 2023
Add support for negative stride to FrameBuffer Slice.

Change data type of stride from size_t to ptrdiff_t.

Add support for negative stride in `copyIntoFrameBuffer` and `copyFromFrameBuffer`.

Add a new `testNegativeStride` test.

Fixes: AcademySoftwareFoundation#614
Signed-off-by: 胡玮文 <[email protected]>
huww98 added a commit to huww98/openexr that referenced this issue Jan 19, 2023
Add support for negative stride to FrameBuffer Slice.

Change data type of stride from size_t to ptrdiff_t.

Add support for negative stride in `copyIntoFrameBuffer` and `copyFromFrameBuffer`.

Add a new `testNegativeStride` test.

Fixes: AcademySoftwareFoundation#614
Signed-off-by: 胡玮文 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Feedback The issue is waiting for someone to respond. Feature Request A suggested change or addition of functionality to the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants