Skip to content

Conversation

TodicaIonut
Copy link
Contributor

Description

ISO setting of the camera

Tests

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
@lgritz
Copy link
Collaborator

lgritz commented Aug 5, 2025

Can you explain what the purpose of this PR is, what problem is being solved and what behavior change you are aiming for? I can't quite tell what the point is, since it's already possible for OpenEXR to store arbitrary named metadata.

@JGoldstone
Copy link
Contributor

Moreover isoSpeed has been in the implementation for years if not decades

//
// isoSpeed -- the ISO speed of the film or the ISO setting of the camera
// that was used to record the image
//

IMF_STD_ATTRIBUTE_DEF (isoSpeed, IsoSpeed, float)

@lgritz
Copy link
Collaborator

lgritz commented Aug 6, 2025

OIIO already correctly reads and writes any of the arbitrary named metadata in an exr file (certainly for all the standard types like float and string, etc).

The only time we need special handling is for particular metadata items that are very important (and important to preserve when copying image from one file format to another), and that has DIFFERENT names or different types for each file formats. In those cases, we pick one canonical name and type and have the other formats automatically translate between the internal canonical name/type and the format-specific name.

An example of is this is that most formats have some kind of title, description, caption, or whatever, but they all call it something different. We chose the TIFF name for this, "ImageDescription", as our canonical name (somewhat arbitrarily, but mostly because 15 years ago, TIFF was widely used and long established). So in the openexr reader, we take the OpenEXR attribute "comments" and change it to "ImageDescription", and in the writer, we change "ImageDescription" to the standard OpenEXR attribute "comments." This basically lets you do things like

oiiotool in.tif -o out.exr
oiiotool in.exr -o out.tif

and the data will get transferred properly between the files, despite how the two formats use different nomenclature for it, and also for applications to be able to ask for a single name, "ImageDescription" to get this common data, regardless of file type, and without needing to know that it might have been different original names in different files.

@lgritz
Copy link
Collaborator

lgritz commented Aug 6, 2025

To spell it out more concretely, when we identify one of these items for which we wish to create a single canonical cross-format name for:

  • We choose a name used by one format, the one that we think is most descriptive, commonly used, or sometimes just default to the historical precedent of the name used by the oldest widely used format that picked a name for that common item.
  • The format that already uses the name we want to use canonically does not need to change since it's already using the "right" name.
  • Other formats may need translation from and to our chosen canonical name.

@lgritz lgritz added the file formats Image file formats, ImageInput, ImageOutput label Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file formats Image file formats, ImageInput, ImageOutput
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants