Image: Use OpenImageIO for loading and saving a variety of image formats #105785

Merged
Jesse Yurkovich merged 9 commits from deadpin/blender:oiio-land-formats into main 2023-04-12 05:22:39 +02:00

9 Commits

Author SHA1 Message Date
Jesse Yurkovich e1ae9aa508 Merge remote-tracking branch 'origin/main' into oiio-land-formats 2023-04-11 13:16:33 -07:00
Jesse Yurkovich 8218153c6f Merge remote-tracking branch 'origin/main' into oiio-land-formats 2023-04-09 15:09:47 -07:00
Jesse Yurkovich 172e5053c6 Merge remote-tracking branch 'origin/main' into oiio-land-formats
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-24 00:05:24 -07:00
Jesse Yurkovich c12b980d4c Merge remote-tracking branch 'origin/main' into oiio-land-formats 2023-03-22 11:27:36 -07:00
Jesse Yurkovich 5c2b726e49 Feedback: Fix grayscale saving to use luminance weights 2023-03-21 11:04:10 -07:00
Jesse Yurkovich adbdb14ae5 Merge remote-tracking branch 'origin/main' into oiio-land-formats 2023-03-21 10:51:51 -07:00
Jesse Yurkovich 9de3aef1eb Merge remote-tracking branch 'origin/main' into oiio-land-formats 2023-03-20 19:40:08 -07:00
Jesse Yurkovich bf24d6b2ee Build fixes for linux/mac
buildbot/vexp-code-patch-coordinator Build done. Details
2023-03-15 15:47:13 -07:00
Jesse Yurkovich d3db309266 Image: Use OpenImageIO for loading and saving a variety of image formats
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.

----

Some test files (attached) are changed. Their summary is as follows:
 - Grayscale BMPs were saved out incorrectly in `main` and Windows refuses to display them. Now fixed.
 - Grayscale PNGs in 16bit format, coming from 32bit float buffers, were saved out incorrectly in `main`. Now fixed.
 - DPX files in all varieties were saved out incorrectly. I think; a second and third pair of eyes on this format would be welcome.

Example DPX changes:
| template EXR | #chan | save/load in main | save/load through OIIO |
| -- | -- | -- | -- |
|  |  |  |  |
|  |  |  |  |

A reminder about 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.
2023-03-14 23:01:38 -07:00