# Access image pixel data WITH color management settings

When accessing pixel data of a bpy.types.Image object, I only get the color information of the image before the color management settings are applied. This is regardless of whether the "View as Render" option is enabled or not. If I choose this option in the image editor, however, the image is displayed with the color management applied. So, the pixel data must exist somewhere in memory.

Is there a way to get the pixel data AFTER the color management settings have been applied via python?

Or alternatively: Is there a way to apply the color management settings to the pixel data manually? (maybe via OpenColorIO?)

• No. There has been a need for an OpenColorIO node for over a decade now. Jan 3 '21 at 16:52
• Thanks for the answer, @troy_s. Bad though. But if Blender relies on OpenColorIO, are you aware of any linked library that is shipped with Blender? If there is one, directly calling this via ctypes would be an option. Unfortunately, I couldn't find one, but maybe I overlooked it!? Jan 3 '21 at 17:00
• I would think you could add on something via Python. Jan 4 '21 at 14:20
• Thanks for your thoughts, troy_s. Jan 8 '21 at 13:58
• Any time. I wish I could be more helpful here, but I don’t have much time to tinker with Blender Python APIs and such. Happy to help you out by checking the code / script if you invest some time into this. If you write up an actual node, I could see it possibly (?) getting merged? But that’s up to the Aristomeritocracy. Jan 8 '21 at 18:55

3. save the image with image.save_render(path, scene=tmp_scene)
4. read the file at path back in as an image and access its pixels
• Thanks for the suggestions. But this is actually something I would like to avoid. If one would like to do it like that, the more direct way of this work around would probably also be using the save_as() method of the bpy.types.Image. However, I would really like to have a more direct way, if this is possible. Jan 2 '21 at 19:01
• Yeah, it's not nice. You can use save_render, I'd forgotten about that. Jan 2 '21 at 19:15