From e107a27204dc6e57b43a947b98acf85b615d2aaa Mon Sep 17 00:00:00 2001 From: John Haddon Date: Fri, 22 Mar 2024 11:25:02 +0000 Subject: [PATCH] CI : Update to GafferHQ/dependencies 8.0.0a9 This contains fixes to handling of DWA compression in OpenEXRCore, as demonstrated in the new ImageReader unit tests. --- .github/workflows/main/installDependencies.py | 2 +- Changes.md | 10 +++++++++ python/GafferImageTest/ImageReaderTest.py | 21 ++++++++++++++++++ python/GafferImageTest/images/dwaFloat.exr | Bin 0 -> 811 bytes .../images/dwaHalfWithLayerPrefix.exr | Bin 0 -> 902 bytes 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 python/GafferImageTest/images/dwaFloat.exr create mode 100644 python/GafferImageTest/images/dwaHalfWithLayerPrefix.exr diff --git a/.github/workflows/main/installDependencies.py b/.github/workflows/main/installDependencies.py index 9384ad33afd..375b46d613a 100755 --- a/.github/workflows/main/installDependencies.py +++ b/.github/workflows/main/installDependencies.py @@ -49,7 +49,7 @@ # Determine default archive URL. -defaultURL = "https://github.com/GafferHQ/dependencies/releases/download/8.0.0a8/gafferDependencies-8.0.0a8-{platform}{buildEnvironment}.{extension}" +defaultURL = "https://github.com/GafferHQ/dependencies/releases/download/8.0.0a9/gafferDependencies-8.0.0a9-{platform}{buildEnvironment}.{extension}" # Parse command line arguments. diff --git a/Changes.md b/Changes.md index 0fcbf7727fd..7d861fabc5e 100644 --- a/Changes.md +++ b/Changes.md @@ -23,6 +23,9 @@ Fixes - Fixed error message to include filename [^1]. - Expression : `setExpression()` now respects configs that provide backwards compatibility for old plug names. - Shuffle : Fixed default name for plugs constructed via the legacy `ChannelPlug( out, in )` constructor [^1]. +- ImageReader : + - Fixed loading of OpenEXR images with 32 bit float data and DWA compression [^1]. + - Fixed loading of secondary layers in OpenEXR images with DWA compression [^1]. API --- @@ -36,6 +39,13 @@ Breaking Changes - StandardLightVisualiser : Added `attributeName` argument to `surfaceTexture()` virtual method. +Build +----- + +- OpenEXR : Applied patches from the following pull requests : + - https://github.com/AcademySoftwareFoundation/openexr/pull/1591 + - https://github.com/AcademySoftwareFoundation/openexr/pull/1684 + [^1]: To be omitted from final release notes for 1.4.0.0. 1.4.0.0b4 (relative to 1.4.0.0b3) diff --git a/python/GafferImageTest/ImageReaderTest.py b/python/GafferImageTest/ImageReaderTest.py index 47849a61915..4f38b9a9c5d 100644 --- a/python/GafferImageTest/ImageReaderTest.py +++ b/python/GafferImageTest/ImageReaderTest.py @@ -959,5 +959,26 @@ def testSerialisation( self ) : script2.execute( serialisation ) self.assertIsInstance( script2["reader"], GafferImage.ImageReader ) + def testDWACompression( self ) : + + reader = GafferImage.ImageReader() + + stats = GafferImage.ImageStats() + stats["in"].setInput( reader["out"] ) + stats["areaSource"].setValue( stats.AreaSource.DataWindow ) + + for file in [ + "dwaHalfWithLayerPrefix.exr", + "dwaFloat.exr" + ] : + with self.subTest( file = file ) : + + reader["fileName"].setValue( self.imagesPath() / file ) + stats["channels"].setValue( reader["out"].channelNames() ) + + for stat in ( "min", "max", "average" ) : + for c, expected in zip( stats[stat].getValue(), imath.Color4f( 0.3, 0.6, 0.9, 0 ) ) : + self.assertAlmostEqual( c, expected, delta = 0.0001 ) + if __name__ == "__main__": unittest.main() diff --git a/python/GafferImageTest/images/dwaFloat.exr b/python/GafferImageTest/images/dwaFloat.exr new file mode 100644 index 0000000000000000000000000000000000000000..79c1edbc798faec3c733cebedabc8eae4fb84860 GIT binary patch literal 811 zcmcgq!AiqG5S`W@dXj>I*FAU=6Jy${4T9JzDhQQ&@FtAO)Glmy!|vLqp1k`5{+eH- zo0@2A58fOYW@qx=%wr~#z5PlR0M0W$jIPG`NSEALrDtHQ=JF8|_fc`KtWtt`UW(R| zmMm7%Sd^Bvvo>ooFJVKW&@ylQBw`l$&E3F1aNcnoN74MjQO2nzW4MwmnIbYzF@xh& zkWZPuRYN;PP37EYH@BaXoNK!3v(Rt*M}EK}_8)3uOwZ7Mi`j5u!XRu#K{Et-+y#bs=A8Zk56>Rw{#)3M?#V>76&JCus4G%S27#L1iI_M&7@$ znv1z7+@u0$f8(au`?WYEp{r04-Nbyq6Ob zYa;n2phwdEColiVn@GPz+1UJM|gFajVGIm#VADT2U%viCBjL kY*sH|yV`|T6+Ya#oafU@WUT?&{l?&CX9sJr_Fg&u1Xnk;w*UYD literal 0 HcmV?d00001 diff --git a/python/GafferImageTest/images/dwaHalfWithLayerPrefix.exr b/python/GafferImageTest/images/dwaHalfWithLayerPrefix.exr new file mode 100644 index 0000000000000000000000000000000000000000..b29be173de2331e8b5ca17ca1d57147a48800474 GIT binary patch literal 902 zcmd5)&1%~~5FRx?SSR_Yu0%1tAs z@x~|-h7Ed8R*T$d=TUnxZKq-^!a`K2N)gsyR4(FZd=y8o+24pTuQb-=1gZrUCd!U_ za5jJ$(=w}-3udhwOU_B7MX^E@p%D)2Mo~nq{bWkNLQ8|R?<{TJkY3Ban2RKuMki4$ zQt_V%&awG`{z2~n>rLWhlE&jSNyKrSj!zip6>3e&L0&1|JzVlwzoQuhoOIU3&WGjw zt&u%xz{XOya7VXWpvP;e3$ucSX%h+iTpeu0pz}hyM&a$h=T><7c!QU;Bn721=+`U& zlbMp5=C&XUk7)gijciH1cMat}LodzNxx05Rw?z84fK$@^1Ywz!usbN_xH)ny3t#;~ z0YAHU-rF~h8|hG9#}|FJw^ey$7~A)uaFb literal 0 HcmV?d00001