sRGB color profile does not save with image #121173

Open
opened 2024-04-27 22:17:34 +02:00 by Robert S · 6 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 552.12

Blender Version
Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: e1743a0317bc
Worked: (newest version of Blender that worked as expected)

Short description of error
Having a heck of a difficult time using texture painting: https://blenderartists.org/t/textures-and-alpha-modes-oh-my/1161715/21?u=eobet

Exact steps for others to reproduce the error

  1. Import PNG with sRGB profile
  2. Texture paint on it and save it (even using "save as" with "srgb" explicitly set).

Expected:

Image should save with sRGB color profile.

Result:

Image (at least by confirming with Affinity Photo) does not get saved with any color profile.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 552.12 **Blender Version** Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: `e1743a0317bc` Worked: (newest version of Blender that worked as expected) **Short description of error** Having a heck of a difficult time using texture painting: https://blenderartists.org/t/textures-and-alpha-modes-oh-my/1161715/21?u=eobet **Exact steps for others to reproduce the error** 1. Import PNG with sRGB profile 2. Texture paint on it and save it (even using "save as" with "srgb" explicitly set). Expected: Image should save with sRGB color profile. Result: Image (at least by confirming with Affinity Photo) does not get saved with any color profile.
Robert S added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-04-27 22:17:35 +02:00

Looking at saved image with GIMP, I see sRGB colorspace in metadata. Or am I misunderstanding this? Either way, can you upload image that has this profile and one that has not?

Looking at saved image with GIMP, I see sRGB colorspace in metadata. Or am I misunderstanding this? Either way, can you upload image that has this profile and one that has not?
Richard Antalik added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-04-28 04:09:14 +02:00
Author

Krita also reports no color profile:

image

Here's the image. There's a few red pixels in the middle of it which I just painted using Blender:

Krita also reports no color profile: ![image](/attachments/fbfa35c0-4133-42d9-87fd-e4f59eca0b6e) Here's the image. There's a few red pixels in the middle of it which I just painted using Blender:

Can you upload the image that has the color profile still embedded? I am a bit confused though, since my understanding is, that color profile controls how the colors within image are displayed on particular device, so not sure why this data needs to be embedded in image.

BTW, I have found this article: https://www.blendernation.com/2022/03/04/embedding-icc-profiles-into-renders/
Also I have checked metadata with online viewer, GIMP seems to correct these when image is loaded, and the colorspace is not actually defined.

As far as embedding ICC profiles, I still don't understand why this would be even good idea. But missing colorspace is not great I guess. With PNG's there is assumption, that it will be sRGB, but IMO it could be specified in metadata. Would have to look in code how hard this would be.

Can you upload the image that has the color profile still embedded? I am a bit confused though, since my understanding is, that color profile controls how the colors within image are displayed on particular device, so not sure why this data needs to be embedded in image. BTW, I have found this article: https://www.blendernation.com/2022/03/04/embedding-icc-profiles-into-renders/ Also I have checked metadata with online viewer, GIMP seems to correct these when image is loaded, and the colorspace is not actually defined. As far as embedding ICC profiles, I still don't understand why this would be even good idea. But missing colorspace is not great I guess. With PNG's there is assumption, that it will be sRGB, but IMO it could be specified in metadata. Would have to look in code how hard this would be.
Author

It's important to understand that there is no "still" here. I created the image inside of Blender and I painted it inside of Blender. For the above image, in my actual working project, it never saves with sRGB embedded. Unfortunately, attempting to recreate this in a minimal example has failed so far.

I can, however, upload a version which I consider "destroyed by Blender". Again, neither of these have been edited in an external application and they all original from the same Blender created new image. I'm trying to make sense of the behavior I'm seeing but currently I can't (though I suspect the issue lies with the thread I linked).

It's important to understand that there is no "still" here. I created the image inside of Blender and I painted it inside of Blender. For the above image, in my actual working project, it never saves with sRGB embedded. Unfortunately, attempting to recreate this in a minimal example has failed so far. I can, however, upload a version which I consider "destroyed by Blender". Again, neither of these have been edited in an external application and they all original from the same Blender created new image. I'm trying to make sense of the behavior I'm seeing but currently I can't (though I suspect the issue lies with the thread I linked).

Thanks for update and sorry for late response. Tried to replicate the issue with provided file, but it seems to work fine for me. See attached image. Even Krita does not complain, when loading this file.

I have checked with 4.1 version and 4.2, both produced the same result. Could it be, that you use custom OCIO config?

Thanks for update and sorry for late response. Tried to replicate the issue with provided file, but it seems to work fine for me. See attached image. Even Krita does not complain, when loading this file. I have checked with 4.1 version and 4.2, both produced the same result. Could it be, that you use custom OCIO config?
Author

I haven't made any deliberate changes in that area, but yeah, I too have now failed in replicating it in an empty file.

I wonder if some of what I'm seeing is due to this (which is now from a workaround where I'm separating out the alpha to a different image, but I noticed that the corresponding geometry node doesn't have the color space selection... which shouldn't affect how a texture painted image is saved, but still):

726fd6063d6ebd19c02d3d11094f927754d75e9d

I haven't made any deliberate changes in that area, but yeah, I too have now failed in replicating it in an empty file. I wonder if some of what I'm seeing is due to this (which is now from a workaround where I'm separating out the alpha to a different image, but I noticed that the corresponding geometry node doesn't have the color space selection... which shouldn't affect how a texture painted image is saved, but still): ![726fd6063d6ebd19c02d3d11094f927754d75e9d](/attachments/70b8e397-bb46-4598-aead-1dbd097dd604)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#121173
No description provided.