Image: Use OpenImageIO for loading and saving a variety of image formats #105785
No reviewers
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105785
Loading…
Reference in New Issue
No description provided.
Delete Branch "deadpin/blender:oiio-land-formats"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This checkin will use OIIO to replace the image save/load code for BMP,
DDS, DPX, HDR, PNG, TGA, and TIFF.
This simplifies our build environment, reduces binary duplication,
removes large amounts of hard to maintain code, and fixes some bugs
along the way.
It should also help reduce rare differences between Blender and Cycles
which already uses OIIO for most situations. Or potentially makes them
easier to solve once discovered.
This is a continuation of the work for #101413
Test changes and bug fixes
Some test files (attached) are changed. Their summary is as follows:
main
and Windows refuses to display them. Now fixed.Example DPX changes:
DDS code
I think the existing dds directory can be removed entirely instead of just being excluded like it is now. However, I'd like to keep it for a while longer and delete it during bcon2 of 3.6 if possible for ease of repros in the next few weeks.
The Remaining Formats
I'll continue to work towards a partial conversion of EXR, JPG, and WEBP but I can't commit to those for 3.6.
Thumbnail support for these 3 formats are what's stopping a full conversion.
JPEG 2000 support is lacking and that will take additional effort to solve if we want that format too.
WIP: Image: Use OpenImageIO for loading and saving a variety of image formatsto Image: Use OpenImageIO for loading and saving a variety of image formatsIt always helps to show the change, when something changes. =)
I had to track down the current SVN_imbuf_io to see that you switched it from taking the Rec 709 luma weights for RGB to BW conversion in main, to taking just the red channel as the BW input.
That seems wrong, BW is supposed to convert RGB to grayscale rather than using just 1 channel.
From the description I understand that there are expected differences in file saving, but from the tests it seems there are also differences in file loading?
I didn't spot mistakes in the code, but marking request changes for the BW saving and failing tests.
I think the Cycles test failures are because the PR branch here is behind main a bit and those tests were recently updated in SVN. I'll merge main after figuring out the PNG issue below.
As for the PNG issue, here is what they look like. For "main", is the "16 bit from 32 bit" case broken? Or is it correct and all the others are actually the broken ones?
It seems to be all the others. Those match viewing just the R channel in the image editor, which is not what is expected.
Alright, latest update is using the luminance values for all grayscale images now. This fixes BMP,PNG,TGA, and TIFF which were all using just 1-channel.
This will fix #103728 and probably several others. JPG format remains "broken" and would require a separate fixup.
I'll be away on travel with little to no internet until April 10th. I'll respond to any further feedback once I'm back but there's no additional known items outstanding on the patch I think.
@blender-bot build
@deadpin https://builder.blender.org/admin/#/builders/31/builds/9466
@ankitm should be fixed now with
1771ded381