Blender saves malformed png files that can't be opened by exiv2 library #112275

Closed
opened 2023-09-12 12:40:45 +02:00 by M Z · 5 comments

System Information
Operating system: Windows-7/10

Blender Version
Broken: version: 3.6.0 - 3.6.2
Worked: 3.4.1 for sure, most probably 3.5

Short description of error
Blender saves malformed png files that can't be opened by exiv2 library.
More in-depth analysis: https://github.com/Exiv2/exiv2/issues/2745

There are actually 2 (identical!) eXIf chunks in this PNG file, but very short so might not carry any significant metadata:

Btw, exiftool -v3 also warns about overlapping TIFF directories, so at least that should be reported to Blender as well

Ok, so the TIFF signature 4d 4d 2a 00 is invalid for this eXIf chunk. For big-endian encoding, it must be 4d 4d 00 2a.
This is a Blender (or whatever library they use to write PNGs) bug.

Exact steps for others to reproduce the error

  1. Render image
  2. Save as png
**System Information** Operating system: Windows-7/10 **Blender Version** Broken: version: 3.6.0 - 3.6.2 Worked: 3.4.1 for sure, most probably 3.5 **Short description of error** Blender saves malformed png files that can't be opened by exiv2 library. More in-depth analysis: https://github.com/Exiv2/exiv2/issues/2745 > There are actually 2 (identical!) eXIf chunks in this PNG file, but very short so might not carry any significant metadata: >Btw, exiftool -v3 also warns about overlapping TIFF directories, so at least that should be reported to Blender as well >Ok, so the TIFF signature 4d 4d 2a 00 is invalid for this eXIf chunk. For big-endian encoding, it must be 4d 4d 00 2a. >This is a Blender (or whatever library they use to write PNGs) bug. **Exact steps for others to reproduce the error** 1. Render image 2. Save as png
M Z added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-09-12 12:40:46 +02:00
Iliya Katushenock added the
Interest
Images & Movies
label 2023-09-12 13:43:15 +02:00

The bug is not in the blender, is it? If another program cannot open the data, the first step is to check whether others can open it.

The bug is not in the blender, is it? If another program cannot open the data, the first step is to check whether others can open it.
Author

It is a Blender's bug, as files saved in Blender do not conform to the standard. In the provided link you can check more in-depth analysis why these files are not correct.

It is a Blender's bug, as files saved in Blender do not conform to the standard. In the provided link you can check more in-depth analysis why these files are not correct.

I guess this started happening with the switch to OpenImageIO. CC @deadpin.

I guess this started happening with the switch to OpenImageIO. CC @deadpin.

I have a PR out for OIIO now dealing with the main issue that prevents loading: https://github.com/OpenImageIO/oiio/pull/3984

I have a PR out for OIIO now dealing with the main issue that prevents loading: https://github.com/OpenImageIO/oiio/pull/3984
Jesse Yurkovich added
Status
Confirmed
Module
Core
and removed
Status
Needs Triage
labels 2023-09-12 20:18:05 +02:00

The fix should now be available in 3.6.5 as well as the pending 4.0 release.

The fix should now be available in 3.6.5 as well as the pending 4.0 release.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-10-20 01:28:54 +02:00
Jesse Yurkovich added
Status
Resolved
and removed
Status
Archived
labels 2023-10-20 01:29:15 +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
4 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#112275
No description provided.