Python API : Wrong color space with bpy.ops.image.save_as() #80421

Closed
opened 2020-09-03 09:33:57 +02:00 by Léo Depoix · 7 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: Quadro M4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.70

Blender Version
Broken: version: 2.83.5, branch: master, commit date: 2020-08-19 06:07, hash: c2b144df39
Worked: I don't know

Short description of error
I'm trying to make a bash script that bake a normal map from a texture but the output image as a wrong color space (as PNG).
I also tryed to export as EXR but the output image is always corrupted.

Final exported normal map (with wrong colors): wrong_normal.png

You can find more informations on the devtalk thread: Devtalk > Python API: baking normal map save wrong color space on export

Exact steps for others to reproduce the error
From Blender:

  1. Extract the attached archive in an empty directory
  2. Open the "normal_bake_scene.blend" file
  3. Start the python script from python script editor
  4. Look at "ouput_normal.png" file when the processing is done

From command line:

  1. Add your correct blender executable path in the start_blender.bat file
  2. Launch it
  3. Look at "ouput_normal.png" file when the processing is done

color_space_bug_report.zip

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: Quadro M4000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.70 **Blender Version** Broken: version: 2.83.5, branch: master, commit date: 2020-08-19 06:07, hash: `c2b144df39` Worked: I don't know **Short description of error** I'm trying to make a bash script that bake a normal map from a texture but the output image as a wrong color space (as PNG). I also tryed to export as EXR but the output image is always corrupted. Final exported normal map (with wrong colors): ![wrong_normal.png](https://archive.blender.org/developer/F8835676/wrong_normal.png) You can find more informations on the devtalk thread: [Devtalk > Python API: baking normal map save wrong color space on export](https://devtalk.blender.org/t/python-api-baking-normal-map-save-wrong-color-space-on-export/15154/4) **Exact steps for others to reproduce the error** From Blender: 1. Extract the attached archive in an empty directory 2. Open the "normal_bake_scene.blend" file 3. Start the python script from python script editor 4. Look at "ouput_normal.png" file when the processing is done From command line: 1. Add your correct blender executable path in the start_blender.bat file 2. Launch it 3. Look at "ouput_normal.png" file when the processing is done [color_space_bug_report.zip](https://archive.blender.org/developer/F8835720/color_space_bug_report.zip)
Author

Added subscriber: @PiloeGAO

Added subscriber: @PiloeGAO
Author

After some experiments and tweeking this worked as expected in Blender 2.90.

After some experiments and tweeking this worked as expected in Blender 2.90.

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

In #80421#1010243, @leonumerique wrote:
After some experiments and tweeking this worked as expected in Blender 2.90.

Thanks for info. Does that mean that this issue was fixed?

> In #80421#1010243, @leonumerique wrote: > After some experiments and tweeking this worked as expected in Blender 2.90. Thanks for info. Does that mean that this issue was fixed?
Author

Yes, you can close this issue.

Yes, you can close this issue.

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Richard Antalik self-assigned this 2020-09-10 23:43:21 +02:00
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#80421
No description provided.