Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Support arbitrary attributes #27

Open
abusch opened this issue Jan 29, 2018 · 5 comments
Open

Support arbitrary attributes #27

abusch opened this issue Jan 29, 2018 · 5 comments

Comments

@abusch
Copy link

abusch commented Jan 29, 2018

It looks like OpenEXR supports arbitrary attributes in the header. There are a bunch of standard, but optional, atrtributes defined in https://github.com/openexr/openexr/blob/develop/OpenEXR/IlmImf/ImfStandardAttributes.h

It would be nice to support at least some of them, like owner, comments, or capDate.

I may give it a shot maybe if I can find a bit of time, but might need a little bit of guidance :)

@cessen
Copy link
Owner

cessen commented Jan 30, 2018

Ah, yes! This is definitely something we want to support. Just haven't gotten around to it. I think the main concern is design. The C++ API allows for some C++ specific capabilities with custom attributes, IIRC, so part of the question is simply how far do we go in trying to support that. But at least covering integers, floats, matrices, and strings would be good.

I would be delighted if you wanted to take a crack at it. I don't have tons of time to provide guidance right at this moment, but I'll do my best!

@Ralith
Copy link
Collaborator

Ralith commented Jan 30, 2018

I attempted this once previously and found that the built-in extended attributes rely heavily enough on C++ template magic that they cannot be handled generically in C bindings, i.e. they must be painstakingly bound individually. Yes, this seems implausible, but if you dig deep enough I believe you'll come to the same conclusion.

It would certainly be nice to have, though! Non-standard extended attributes can be handled more gracefully, as well.

@norru
Copy link
Contributor

norru commented Jul 9, 2019

@Ralith @cessen @abusch
For my current project I absolutely need support for (writing) the multiView attribute. This is the only attribute I need to get past a brick wall.

IMF_STD_ATTRIBUTE_DEF (multiView , MultiView, StringVector)

I need a very very short term fix (ie I have zero resource to dedicate to write full arbitrary attributes support) otherwise I cannot progress with my project, a hack if necessary. Any suggestions?

they must be painstakingly bound individually.

In this context, it's acceptable to have a header.set_multi_view(&[&str]]) dedicated call which does one and one thing only.

@Ralith
Copy link
Collaborator

Ralith commented Jul 9, 2019

I'll try to bang that one out; I'll probably want it someday myself.

@Ralith
Copy link
Collaborator

Ralith commented Jul 9, 2019

See #39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants