Skip to content

ImageReader, TextureLoader : Remove special case for png colorspaces - #1553

Open
ivanimanishi wants to merge 1 commit into
ImageEngine:RB-10.7from
ivanimanishi:pngLoadingAndOIIO3
Open

ImageReader, TextureLoader : Remove special case for png colorspaces#1553
ivanimanishi wants to merge 1 commit into
ImageEngine:RB-10.7from
ivanimanishi:pngLoadingAndOIIO3

Conversation

@ivanimanishi

Copy link
Copy Markdown
Member

OIIO 3 doesn't have "linear" built-in anymore, and it now needs to come from the config.

This is causing errors when trying to open png files, as often there isn't a colorspace specifically called "linear".

The original reasons for hard-coding that colorspace don't seem to apply anymore, neither ImageEngine nor gaffer are loading UI icons that way, so it seems reasonable to remove it, and treat png files just like any other image.

Generally describe what this PR will do, and why it is needed.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Cortex project's prevailing coding style and conventions.

OIIO 3 doesn't have "linear" built-in anymore, and it now needs to come
from the config.

This is causing errors when trying to open png files, as often there
isn't a colorspace specifically called "linear".

The original reasons for hard-coding that colorspace don't seem to apply
anymore, neither ImageEngine nor gaffer are loading UI icons that way,
so it seems reasonable to remove it, and treat png files just like any
other image.
@ivanimanishi

ivanimanishi commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

@johnhaddon , see if you have any issues with this fix. We are trying to switch to OIIO 3 / Gaffer 1.7, but are getting some unittests failing because they can't read pngs anymore.

As stated in the PR description and commit message, I can't see any obvious other issue with the pngs in UIs, which was the reason why Andrew added the special case there in the first place.

@danieldresser-ie thought this fix is a reasonable one, but there is a potential discussion about the way all the other image formats were being read, but I'd prefer to limit this PR to the immediate fix, so we can move forward here, particularly since I don't have clear alternative. But if you think there is a better solution, just let me know.

At IE, we are trying to avoid the use of IECoreImage on new code, but it will still take some time to remove all of the existing ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant