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

Extend multipart RgbaInputFile API #1201

Merged

Conversation

peterhillman
Copy link
Contributor

Extends #1194 with more functionality for reading multipart files using RgbaInputFile:

  • use MultiPartInputFile and InputPart for all constructors
  • Provide constructors which take a part number for all constructor variations. Original constructors which do not provide part number simply call the 'part number' variation with part=0
  • allow part to be changed in already opened file (or both part and layer)
  • method to return number of parts in a file, to allow iterating over all parts in a file
  • testRgbaFile extended to test new functionality

I'm not 100% sure that MultiPartInputFile + InputPart handles weird edge cases identically to InputFile, so some semi-broken files may be handled differently.

ignus2 and others added 4 commits November 5, 2021 21:10
Signed-off-by: Balazs OROSZI <orobalage@gmail.com>
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
@cary-ilm
Copy link
Member

This all looks fine to me, but is it worth adding a reference to this in the documentation, since it's new functionality?

@peterhillman
Copy link
Contributor Author

It is worth documenting, yes. I don't see any documentation of setLayerName() either, or any use of the MultiPart API, so those should be added too. That would be a larger project

Copy link
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cary-ilm cary-ilm merged commit a29fa05 into AcademySoftwareFoundation:master Jan 18, 2022
cary-ilm pushed a commit to cary-ilm/openexr that referenced this pull request Jan 19, 2022
* RgbaInputFile: Multipart support test

Signed-off-by: Balazs OROSZI <orobalage@gmail.com>

* extend multipart RgbaInputFile API

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>

* remove RgbaInputFile friend from MultiPartInputFile

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>

* fix test failure: test all parts for completion

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>

* add missing export to ImfRgbaFile.h

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>

* add multipart Rgba support to Imf::CheckFile

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>

Co-authored-by: Balazs OROSZI <orobalage@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants