From 419541ba8315efc5617b260f98874e46a30fa3b3 Mon Sep 17 00:00:00 2001 From: Luna Kim Date: Mon, 12 Oct 2026 00:42:24 -0700 Subject: [PATCH] fix(ImageBuf): nmiplevels() returns 0 for non-IC ImageBuf The ImageBuf constructor path without an ImageCache ends in `init_spec()`. There, the non-IC branch only reset `m_nmiplevels = 0` and never assigned a real value, so `IB::nmiplevels()` always returned 0. Now `IB::nmiplevels()` returns 1 for non-MIP-mapped images, or assigns the number of MIP levels if it can be known up front using the `oiio:miplevels` spec attribute. A return value of 0 for `IB::nmiplevels()` indicates a named file that failed `validate_spec()`. This improves ImageInput for EXR, DDS, and TIFF to set the "oiio:miplevels" attribute when the number of MIP levels is greater than one (Ptex is already setting it), so that `IB::nmiplevels()` can get the attribute's value and save it to `ImageBufImpl::m_nmiplevels`. A test for `IB::nmiplevels()` is added to the python-imagebuf testsuite. Documentation for the `oiio:miplevels` attribute is also updated. TIFF related broken links in `tiffinput.cpp` comments are replaced with valid ones. Fixes #5409 Signed-off-by: Luna Kim --- src/dds.imageio/ddsinput.cpp | 4 ++++ src/doc/builtinplugins.md | 12 ++++++++++ src/doc/stdmetadata.md | 8 +++++++ src/include/OpenImageIO/imagebuf.h | 3 ++- src/libOpenImageIO/imagebuf.cpp | 20 ++++++++++++++-- src/openexr.imageio/exrinput.cpp | 10 ++++---- src/openexr.imageio/exrinput_c.cpp | 10 ++++---- src/tiff.imageio/tiffinput.cpp | 16 +++++++++---- testsuite/dds/ref/out.txt | 5 ++++ testsuite/iinfo/ref/out-fmt6.txt | 2 ++ testsuite/iinfo/ref/out.txt | 2 ++ testsuite/maketx/ref/out-alt.txt | 24 +++++++++++++++++++ testsuite/maketx/ref/out-macarm.txt | 24 +++++++++++++++++++ testsuite/maketx/ref/out.txt | 24 +++++++++++++++++++ testsuite/oiiotool-maketx/ref/out-macarm.txt | 17 +++++++++++++ testsuite/oiiotool-maketx/ref/out-rhel7.txt | 16 +++++++++++++ testsuite/oiiotool-maketx/ref/out-win.txt | 17 +++++++++++++ testsuite/oiiotool-maketx/ref/out.txt | 17 +++++++++++++ testsuite/openexr-multires/ref/out.txt | 13 ++++++++++ testsuite/python-imagebuf/ref/out.txt | 9 +++++++ .../python-imagebuf/src/test_imagebuf.py | 9 +++++++ testsuite/python-imageinput/ref/out-alt.txt | 1 + testsuite/python-imageinput/ref/out-alt2.txt | 1 + .../python-imageinput/ref/out-py37-jpeg9d.txt | 1 + .../ref/out-python3-win-2.txt | 1 + .../python-imageinput/ref/out-python3-win.txt | 1 + testsuite/python-imageinput/ref/out.txt | 1 + 27 files changed, 249 insertions(+), 19 deletions(-) diff --git a/src/dds.imageio/ddsinput.cpp b/src/dds.imageio/ddsinput.cpp index 8b4ba441b2..7825bcb911 100644 --- a/src/dds.imageio/ddsinput.cpp +++ b/src/dds.imageio/ddsinput.cpp @@ -796,6 +796,10 @@ DDSInput::seek_subimage(int subimage, int miplevel) m_subimage = subimage; m_miplevel = miplevel; + + if ((m_dds.flags & DDS_MIPMAPCOUNT) && (int)m_dds.mipmaps > 1) + m_spec.attribute("oiio:miplevels", (int)m_dds.mipmaps); + return true; } diff --git a/src/doc/builtinplugins.md b/src/doc/builtinplugins.md index 89e5709a34..8c56643a5a 100644 --- a/src/doc/builtinplugins.md +++ b/src/doc/builtinplugins.md @@ -184,6 +184,10 @@ red & green channels). - string - For environment maps, which cube faces are present (e.g., ``"+x -x +y -y"`` if *x* & *y* faces are present, but not *z*). + * - ``oiio:miplevels`` + - int + - The number of MIP levels, only for MIP-mapped files with more than + one level. ``` @@ -1660,6 +1664,10 @@ The official OpenEXR site is . * - ``oiio:subimages`` - int - The number of "parts" (subimages) in the file. + * - ``oiio:miplevels`` + - int + - The number of MIP levels of the part (subimage), only for MIP-mapped + parts with more than one level. * - ``smpte:TimeCode`` - int[2] - SMPTE time code (vecsemantics will be marked as TIMECODE) @@ -2271,6 +2279,10 @@ Ptex files at all. * - ``wrapmode`` - string - the wrap mode as specified by the Ptex file. + * - ``oiio:miplevels`` + - int + - The number of MIP levels of the face (subimage), only when the face + has more than one level. * - *other* - - Any other arbitrary metadata in the Ptex file will be stored directly diff --git a/src/doc/stdmetadata.md b/src/doc/stdmetadata.md index af4c52fd48..d7903366a4 100644 --- a/src/doc/stdmetadata.md +++ b/src/doc/stdmetadata.md @@ -174,6 +174,14 @@ OpenImageIO understands. to find out how many there are. ``` +```{eval-rst} +.. option:: "oiio:miplevels" : int + + The number of MIP levels of the subimage, only present for images + stored in a MIP-mapped layout with more than one MIP level, and absent + for non-MIP-mapped images. +``` + ```{eval-rst} .. option:: "oiio:SourcePath" : string "oiio:SourceFileFormat" : string diff --git a/src/include/OpenImageIO/imagebuf.h b/src/include/OpenImageIO/imagebuf.h index f532f9dc08..b4611da302 100644 --- a/src/include/OpenImageIO/imagebuf.h +++ b/src/include/OpenImageIO/imagebuf.h @@ -1267,7 +1267,8 @@ class OIIO_API ImageBuf { /// Return the number of MIP levels of the current subimage within the /// file this ImageBuf refers to. This will always be 1 for an ImageBuf /// that was not constructed as a direct reference to a file, or if this - /// subimage within the file was not MIP-mapped. + /// subimage within the file was not MIP-mapped. A return value of 0 + /// indicates an error. int nmiplevels() const; /// Return the number of color channels in the image. This is equivalent diff --git a/src/libOpenImageIO/imagebuf.cpp b/src/libOpenImageIO/imagebuf.cpp index fbf06fdd42..8b3511beb1 100644 --- a/src/libOpenImageIO/imagebuf.cpp +++ b/src/libOpenImageIO/imagebuf.cpp @@ -565,6 +565,8 @@ ImageBufImpl::ImageBufImpl(const ImageBufImpl& src) m_nmiplevels = 0; m_spec.erase_attribute("oiio:subimages"); m_nativespec.erase_attribute("oiio:subimages"); + m_spec.erase_attribute("oiio:miplevels"); + m_nativespec.erase_attribute("oiio:miplevels"); m_pixels_read = true; } if (src.m_configspec) @@ -870,6 +872,7 @@ ImageBufImpl::clear() m_name.clear(); m_fileformat.clear(); m_nsubimages = 0; + m_nmiplevels = 0; m_current_subimage = -1; m_current_miplevel = -1; m_spec = ImageSpec(); @@ -2109,7 +2112,18 @@ ImageBuf::miplevel() const int ImageBuf::nmiplevels() const { - m_impl->validate_spec(); + if (!m_impl->validate_spec()) { + // Spec is invalid. Unnamed means no file to refer to (for example, + // default-constructed), so 1 as documented. Named means the file + // failed, so 0. + m_impl->m_nmiplevels = m_impl->m_name.empty() ? 1 : 0; + } else if (m_impl->m_name.empty() || m_impl->m_fileformat.empty()) { + // No direct reference to a file, so 1 as documented. + m_impl->m_nmiplevels = 1; + } else if (m_impl->m_nmiplevels == 0) { + m_impl->m_nmiplevels + = m_impl->m_spec.get_int_attribute("oiio:miplevels", 1); + } return m_impl->m_nmiplevels; } @@ -2389,9 +2403,11 @@ ImageBuf::copy_pixels(const ImageBuf& src) m_impl->m_nsubimages = 1; m_impl->m_current_subimage = 0; m_impl->m_current_miplevel = 0; - m_impl->m_nmiplevels = 0; + m_impl->m_nmiplevels = 1; m_impl->m_spec.erase_attribute("oiio:subimages"); m_impl->m_nativespec.erase_attribute("oiio:subimages"); + m_impl->m_spec.erase_attribute("oiio:miplevels"); + m_impl->m_nativespec.erase_attribute("oiio:miplevels"); return ok; } diff --git a/src/openexr.imageio/exrinput.cpp b/src/openexr.imageio/exrinput.cpp index 54464c7479..246cecaab3 100644 --- a/src/openexr.imageio/exrinput.cpp +++ b/src/openexr.imageio/exrinput.cpp @@ -422,8 +422,11 @@ OpenEXRInput::PartInfo::parse_header(OpenEXRInput* in, spec.deep = Strutil::istarts_with(header->type(), "deep"); - if (levelmode != Imf::ONE_LEVEL) + if (levelmode != Imf::ONE_LEVEL) { spec.attribute("openexr:roundingmode", roundingmode); + if (nmiplevels > 1) + spec.attribute("oiio:miplevels", nmiplevels); + } const Imf::EnvmapAttribute* envmap; envmap = header->findTypedAttribute("envmap"); @@ -1194,11 +1197,6 @@ OpenEXRInput::seek_subimage(int subimage, int miplevel) m_miplevel = miplevel; m_spec = part.spec; - //! Add the number of miplevels as an attribute for the first miplevel. - //! TOFIX: adding the following attribute breaks unit tests - // if (m_miplevel == 0 && part.nmiplevels > 1) - // m_spec.attribute("oiio:miplevels", part.nmiplevels); - // The checks below reject this subimage. Invalidate rather than leave it // as the current one, or a repeat of this same seek would take the early // out above and hand back the spec we just refused. diff --git a/src/openexr.imageio/exrinput_c.cpp b/src/openexr.imageio/exrinput_c.cpp index 323385840a..2ebe8591c6 100644 --- a/src/openexr.imageio/exrinput_c.cpp +++ b/src/openexr.imageio/exrinput_c.cpp @@ -599,8 +599,11 @@ OpenEXRCoreInput::PartInfo::parse_header(OpenEXRCoreInput* in, spec.deep = (storage == EXR_STORAGE_DEEP_TILED || storage == EXR_STORAGE_DEEP_SCANLINE); - if (levelmode != EXR_TILE_ONE_LEVEL) + if (levelmode != EXR_TILE_ONE_LEVEL) { spec.attribute("openexr:roundingmode", (int)roundingmode); + if (nmiplevels > 1) + spec.attribute("oiio:miplevels", nmiplevels); + } exr_envmap_t envmap; rv = exr_attr_get_envmap(ctxt, subimage, "envmap", &envmap); @@ -1218,11 +1221,6 @@ OpenEXRCoreInput::seek_subimage(int subimage, int miplevel) m_miplevel = miplevel; m_spec = part.spec; - //! Add the number of miplevels as an attribute for the first miplevel. - //! TOFIX: adding the following attribute breaks unit tests - // if (m_miplevel == 0 && part.nmiplevels > 1) - // m_spec.attribute("oiio:miplevels", part.nmiplevels); - // The checks below reject this subimage, so don't leave it as the // current one with a spec that failed validation. if (!check_open(m_spec, { 0, 1 << 30, 0, 1 << 30, 0, 1, 0, 1 << 12 })) { diff --git a/src/tiff.imageio/tiffinput.cpp b/src/tiff.imageio/tiffinput.cpp index d5cd7487a3..f3bdb4cb34 100644 --- a/src/tiff.imageio/tiffinput.cpp +++ b/src/tiff.imageio/tiffinput.cpp @@ -27,14 +27,12 @@ // General TIFF information: // TIFF 6.0 spec: -// http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf -// Other Adobe TIFF docs: -// http://partners.adobe.com/public/developer/tiff/index.html +// https://download.osgeo.org/libtiff/doc/TIFF6.pdf // Adobe extensions to allow 16 (and 24) bit float in TIFF (ugh, not on // their developer page, only on Chris Cox's web site?): // http://chriscox.org/TIFFTN3d1.pdf // Libtiff: -// http://remotesensing.org/libtiff/ +// http://www.simplesystems.org/libtiff/ // clang-format off @@ -1483,6 +1481,16 @@ TIFFInput::readspec(bool read_meta) m_spec.channelnames[c] = "z"; } + // Set miplevels attribute in MIP emulation case (m_emulate_mipmap = true). + if (m_emulate_mipmap) { + // libtiff's TIFFNumberOfDirectories() returns tdir_t (uint32_t after + // libtiff v4.5.0, uint16_t before it), but the int cast seems safe for + // any realistic directory count here. + int nmiplevels = (int)TIFFNumberOfDirectories(m_tif); + if (nmiplevels > 1) + m_spec.attribute("oiio:miplevels", nmiplevels); + } + /// read color profile unsigned int icc_datasize = 0; uint8_t* icc_buf = NULL; diff --git a/testsuite/dds/ref/out.txt b/testsuite/dds/ref/out.txt index 0f21c60dfa..7c6d58434b 100644 --- a/testsuite/dds/ref/out.txt +++ b/testsuite/dds/ref/out.txt @@ -11,6 +11,7 @@ Reading ../oiio-images/dds/dds_bc1_mips.dds channel list: R, G, B, A compression: "DXT1" textureformat: "Plain Texture" + oiio:miplevels: 5 Reading ../oiio-images/dds/dds_bc2.dds ../oiio-images/dds/dds_bc2.dds : 16 x 8, 4 channel, uint8 dds SHA-1: B458B3BAA7F457E06D04D0FBF93C003FFA729C97 @@ -74,6 +75,7 @@ Reading ../oiio-images/dds/dds_npot_bc3_mips.dds channel list: R, G, B, A compression: "DXT5" textureformat: "Plain Texture" + oiio:miplevels: 4 Reading ../oiio-images/dds/dds_npot_rgba8.dds ../oiio-images/dds/dds_npot_rgba8.dds : 13 x 7, 4 channel, uint8 dds SHA-1: 6CBA3E2782498E2E92F5E4B08376A2E948FE3BAF @@ -87,6 +89,7 @@ Reading ../oiio-images/dds/dds_npot_rgba8_mips.dds channel list: R, G, B, A textureformat: "Plain Texture" oiio:BitsPerSample: 32 + oiio:miplevels: 4 Reading ../oiio-images/dds/dds_r5g6b5.dds ../oiio-images/dds/dds_r5g6b5.dds : 16 x 8, 3 channel, uint8 dds SHA-1: 37A3BFD2B8A52006B4F07065A90BE774F276B751 @@ -118,6 +121,7 @@ Reading ../oiio-images/dds/dds_rgba8_mips.dds channel list: R, G, B, A textureformat: "Plain Texture" oiio:BitsPerSample: 32 + oiio:miplevels: 5 Reading ../oiio-images/dds/dds_a8.dds ../oiio-images/dds/dds_a8.dds : 24 x 20, 1 channel, uint8 dds SHA-1: 497ACCA96FAAC89AE74BDE8CA7B69B37CA9C5F20 @@ -283,6 +287,7 @@ src/crash-3950.dds : 16 x 1, 4 channel, uint8 dds channel list: R, G, B, A compression: "DXT4" textureformat: "Plain Texture" + oiio:miplevels: 6 oiiotool ERROR: read : "src/crash-bpp.dds": Invalid DDS bytes-per-pixel (322122548). Possible corrupt input? Full command line was: > oiiotool --info -v -a --hash src/crash-bpp.dds diff --git a/testsuite/iinfo/ref/out-fmt6.txt b/testsuite/iinfo/ref/out-fmt6.txt index 18f6417d72..f23197035c 100644 --- a/testsuite/iinfo/ref/out-fmt6.txt +++ b/testsuite/iinfo/ref/out-fmt6.txt @@ -18,6 +18,7 @@ YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -441,6 +442,7 @@ src/mip.tif : 2 x 2, 3 channel, uint8 tiff oiio:AverageColor: "0.25,0.5,0.75" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25,0.5,0.75" + oiio:miplevels: 2 oiio:SHA-1: "1042D991FBDE596CF8FBC5660BC809AC057D8B9A" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 diff --git a/testsuite/iinfo/ref/out.txt b/testsuite/iinfo/ref/out.txt index a40055176e..83ffe54599 100644 --- a/testsuite/iinfo/ref/out.txt +++ b/testsuite/iinfo/ref/out.txt @@ -18,6 +18,7 @@ YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -442,6 +443,7 @@ src/mip.tif : 2 x 2, 3 channel, uint8 tiff oiio:AverageColor: "0.25,0.5,0.75" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25,0.5,0.75" + oiio:miplevels: 2 oiio:SHA-1: "1042D991FBDE596CF8FBC5660BC809AC057D8B9A" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 diff --git a/testsuite/maketx/ref/out-alt.txt b/testsuite/maketx/ref/out-alt.txt index ab4b57c7ce..b6956f93a7 100644 --- a/testsuite/maketx/ref/out-alt.txt +++ b/testsuite/maketx/ref/out-alt.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -35,6 +36,7 @@ checker.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -54,6 +56,7 @@ checker.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -77,6 +80,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "2E23E9B4C6E707427A73B5433B23104D4183724E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -99,6 +103,7 @@ tahoe-resize.tx : 512 x 512, 3 channel, uint8 tiff YResolution: 96 oiio:AverageColor: "0.101931,0.216697,0.425473" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "799C1441E4B45378165DE450828109AF330A3F87" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -117,6 +122,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -135,6 +141,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -153,6 +160,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -171,6 +179,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -189,6 +198,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -207,6 +217,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -244,6 +255,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -262,6 +274,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -281,6 +294,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -300,6 +314,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -318,6 +333,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -365,6 +381,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr textureformat: "Plain Texture" wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -399,6 +416,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -458,6 +476,7 @@ bumpslope.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -548,6 +567,7 @@ bumpslope-central.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00487623,0.00476811,-1.36547e-05" + oiio:miplevels: 7 oiio:SHA-1: "E332A489C2BCDE63C2DB6A68E847CF396642F0A6" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -642,6 +662,7 @@ bumpslope-normal.exr : 128 x 128, 6 channel, half openexr version: 1 wrapmodes: "black,black" oiio:AverageColor: "-1,-5.0059e-05,5.46902e-05,0.00489737,0.00494693,4.87366e-05" + oiio:miplevels: 8 oiio:SHA-1: "BC210B60E71DDBBA147EAD3C638ACC908C11CF6C" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -744,6 +765,7 @@ cdf.exr : 64 x 64, 1 channel, half openexr textureformat: "Plain Texture" wrapmodes: "black,black" oiio:AverageColor: "0.499779" + oiio:miplevels: 7 oiio:SHA-1: "00DFB31D0260CC466CDCF9FE42446D4896E655FE" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -776,6 +798,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -794,6 +817,7 @@ checker-attribs.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 diff --git a/testsuite/maketx/ref/out-macarm.txt b/testsuite/maketx/ref/out-macarm.txt index 58204c8f4a..bc5cbdc9a9 100644 --- a/testsuite/maketx/ref/out-macarm.txt +++ b/testsuite/maketx/ref/out-macarm.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -35,6 +36,7 @@ checker.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -54,6 +56,7 @@ checker.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -77,6 +80,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "DBEF1FBDC368B03CAFEB8BEC0ACAB6C6E552817F" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -99,6 +103,7 @@ tahoe-resize.tx : 512 x 512, 3 channel, uint8 tiff YResolution: 96 oiio:AverageColor: "0.101931,0.216697,0.425473" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "0C3FC1C922FAEAB3F7A4EEB5DA101E54CA09CC2A" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -117,6 +122,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -135,6 +141,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -153,6 +160,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -171,6 +179,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -189,6 +198,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -207,6 +217,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -244,6 +255,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -262,6 +274,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -281,6 +294,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -300,6 +314,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -318,6 +333,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -365,6 +381,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr textureformat: "Plain Texture" wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -399,6 +416,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -458,6 +476,7 @@ bumpslope.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -548,6 +567,7 @@ bumpslope-central.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00487623,0.00476811,-1.36547e-05" + oiio:miplevels: 7 oiio:SHA-1: "E332A489C2BCDE63C2DB6A68E847CF396642F0A6" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -642,6 +662,7 @@ bumpslope-normal.exr : 128 x 128, 6 channel, half openexr version: 1 wrapmodes: "black,black" oiio:AverageColor: "-1,-5.0059e-05,5.46902e-05,0.00489737,0.00494693,4.87366e-05" + oiio:miplevels: 8 oiio:SHA-1: "BC210B60E71DDBBA147EAD3C638ACC908C11CF6C" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -744,6 +765,7 @@ cdf.exr : 64 x 64, 1 channel, half openexr textureformat: "Plain Texture" wrapmodes: "black,black" oiio:AverageColor: "0.499779" + oiio:miplevels: 7 oiio:SHA-1: "00DFB31D0260CC466CDCF9FE42446D4896E655FE" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -776,6 +798,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -794,6 +817,7 @@ checker-attribs.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 diff --git a/testsuite/maketx/ref/out.txt b/testsuite/maketx/ref/out.txt index c374695796..19df9fb547 100644 --- a/testsuite/maketx/ref/out.txt +++ b/testsuite/maketx/ref/out.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -35,6 +36,7 @@ checker.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -54,6 +56,7 @@ checker.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -77,6 +80,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "2E23E9B4C6E707427A73B5433B23104D4183724E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -99,6 +103,7 @@ tahoe-resize.tx : 512 x 512, 3 channel, uint8 tiff YResolution: 96 oiio:AverageColor: "0.101931,0.216697,0.425473" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "799C1441E4B45378165DE450828109AF330A3F87" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -117,6 +122,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -135,6 +141,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -153,6 +160,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -171,6 +179,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -189,6 +198,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -207,6 +217,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -244,6 +255,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -262,6 +274,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -281,6 +294,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -300,6 +314,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -318,6 +333,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -365,6 +381,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr textureformat: "Plain Texture" wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -399,6 +416,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -458,6 +476,7 @@ bumpslope.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -548,6 +567,7 @@ bumpslope-central.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00487623,0.00476811,-1.36547e-05" + oiio:miplevels: 7 oiio:SHA-1: "E332A489C2BCDE63C2DB6A68E847CF396642F0A6" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -642,6 +662,7 @@ bumpslope-normal.exr : 128 x 128, 6 channel, half openexr version: 1 wrapmodes: "black,black" oiio:AverageColor: "-1,-5.0059e-05,5.46902e-05,0.00489737,0.00494693,4.87366e-05" + oiio:miplevels: 8 oiio:SHA-1: "BC210B60E71DDBBA147EAD3C638ACC908C11CF6C" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -744,6 +765,7 @@ cdf.exr : 64 x 64, 1 channel, half openexr textureformat: "Plain Texture" wrapmodes: "black,black" oiio:AverageColor: "0.499779" + oiio:miplevels: 7 oiio:SHA-1: "00DFB31D0260CC466CDCF9FE42446D4896E655FE" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -776,6 +798,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -794,6 +817,7 @@ checker-attribs.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 diff --git a/testsuite/oiiotool-maketx/ref/out-macarm.txt b/testsuite/oiiotool-maketx/ref/out-macarm.txt index 5021cb4b2d..861a5fef58 100644 --- a/testsuite/oiiotool-maketx/ref/out-macarm.txt +++ b/testsuite/oiiotool-maketx/ref/out-macarm.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -40,6 +41,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "DBEF1FBDC368B03CAFEB8BEC0ACAB6C6E552817F" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -58,6 +60,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -76,6 +79,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -94,6 +98,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -112,6 +117,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -130,6 +136,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -148,6 +155,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -185,6 +193,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -203,6 +212,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -222,6 +232,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -241,6 +252,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -259,6 +271,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -307,6 +320,7 @@ bigval.exr : 2 x 2, 3 channel, half openexr wrapmodes: "black,black" oiio:AverageColor: "1e+06,1e+06,1e+06" oiio:ConstantColor: "1e+06,1e+06,1e+06" + oiio:miplevels: 2 oiio:SHA-1: "E3D97EED7EE68F1885685F312DDD7D8773C29862" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -349,6 +363,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -389,6 +404,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -599,6 +615,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" diff --git a/testsuite/oiiotool-maketx/ref/out-rhel7.txt b/testsuite/oiiotool-maketx/ref/out-rhel7.txt index ce2a6b0d28..4b1ed75d53 100644 --- a/testsuite/oiiotool-maketx/ref/out-rhel7.txt +++ b/testsuite/oiiotool-maketx/ref/out-rhel7.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -40,6 +41,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "2E23E9B4C6E707427A73B5433B23104D4183724E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -58,6 +60,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -76,6 +79,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -94,6 +98,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -112,6 +117,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -130,6 +136,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -148,6 +155,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -185,6 +193,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -203,6 +212,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -222,6 +232,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -241,6 +252,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -259,6 +271,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -304,6 +317,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" openexr:roundingmode: 0 Reading grid.tx @@ -342,6 +356,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -552,6 +567,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" diff --git a/testsuite/oiiotool-maketx/ref/out-win.txt b/testsuite/oiiotool-maketx/ref/out-win.txt index 0b1a50522b..183cfb0bfb 100644 --- a/testsuite/oiiotool-maketx/ref/out-win.txt +++ b/testsuite/oiiotool-maketx/ref/out-win.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -40,6 +41,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "2E23E9B4C6E707427A73B5433B23104D4183724E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -58,6 +60,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -76,6 +79,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -94,6 +98,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -112,6 +117,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -130,6 +136,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -148,6 +155,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -185,6 +193,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -203,6 +212,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -222,6 +232,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -241,6 +252,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -259,6 +271,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -307,6 +320,7 @@ bigval.exr : 2 x 2, 3 channel, half openexr wrapmodes: "black,black" oiio:AverageColor: "1e+06,1e+06,1e+06" oiio:ConstantColor: "1e+06,1e+06,1e+06" + oiio:miplevels: 2 oiio:SHA-1: "E3D97EED7EE68F1885685F312DDD7D8773C29862" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -349,6 +363,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -389,6 +404,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -599,6 +615,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" diff --git a/testsuite/oiiotool-maketx/ref/out.txt b/testsuite/oiiotool-maketx/ref/out.txt index 58f2b3287f..8bb4ceab26 100644 --- a/testsuite/oiiotool-maketx/ref/out.txt +++ b/testsuite/oiiotool-maketx/ref/out.txt @@ -17,6 +17,7 @@ grid.tx : 1000 x 1000, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 10 oiio:SHA-1: "9B24D4CC05313A43973AC384718D81D19183B691" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -40,6 +41,7 @@ grid-resize.tx : 1024 x 1024, 4 channel, uint8 tiff YResolution: 72 oiio:AverageColor: "0.608983,0.608434,0.608728,1" oiio:BitsPerSample: 8 + oiio:miplevels: 11 oiio:SHA-1: "2E23E9B4C6E707427A73B5433B23104D4183724E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -58,6 +60,7 @@ checker-uint16.tx : 128 x 128, 4 channel, uint16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -76,6 +79,7 @@ checker-1chan.tx : 128 x 128, 1 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "1D0A2254373A69C054C08672041FC7DE3BAE5179" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -94,6 +98,7 @@ checker-16x32tile.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -112,6 +117,7 @@ checker-seplzw.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 5 tiff:PhotometricInterpretation: 2 @@ -130,6 +136,7 @@ checker-clamp.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "clamp,clamp" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -148,6 +155,7 @@ checker-permir.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "periodic,mirror" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -185,6 +193,7 @@ checker-camera.tx : 128 x 128, 4 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -203,6 +212,7 @@ checker-opaque.tx : 128 x 128, 3 channel, uint8 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5" oiio:BitsPerSample: 8 + oiio:miplevels: 8 oiio:SHA-1: "2BE3743A64D4309645F94CA7B37D0CD08AF0B38E" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -222,6 +232,7 @@ gray-mono.tx : 256 x 256, 1 channel, uint8 tiff oiio:AverageColor: "0.25098" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098" + oiio:miplevels: 9 oiio:SHA-1: "24049CDF337F17E162291C7B626E0588A9D71160" tiff:Compression: 8 tiff:PhotometricInterpretation: 1 @@ -241,6 +252,7 @@ pink-mono.tx : 256 x 256, 3 channel, uint8 tiff oiio:AverageColor: "0.25098,0.2,0.14902" oiio:BitsPerSample: 8 oiio:ConstantColor: "0.25098,0.2,0.14902" + oiio:miplevels: 9 oiio:SHA-1: "41B1A0D1C1EBB4CEEBC7BCEE2CAB2AAAB4139724" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -259,6 +271,7 @@ checker-prman.tx : 128 x 128, 4 channel, int16 tiff wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" oiio:BitsPerSample: 16 + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -307,6 +320,7 @@ bigval.exr : 2 x 2, 3 channel, half openexr wrapmodes: "black,black" oiio:AverageColor: "1e+06,1e+06,1e+06" oiio:ConstantColor: "1e+06,1e+06,1e+06" + oiio:miplevels: 2 oiio:SHA-1: "E3D97EED7EE68F1885685F312DDD7D8773C29862" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -349,6 +363,7 @@ checker-exr.pdq : 128 x 128, 4 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.5,0.5,0.5,1" + oiio:miplevels: 8 oiio:SHA-1: "D924CA144A02479D1507F5910F5FC8F51EF78765" oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -389,6 +404,7 @@ small.tx : 64 x 64, 3 channel, uint8 tiff oiio:AverageColor: "1,0,0" oiio:BitsPerSample: 8 oiio:ConstantColor: "1,0,0" + oiio:miplevels: 7 oiio:SHA-1: "1DD1CB3C76F9A491B115F85A6DAC1B1A8DD2D3CB" tiff:Compression: 8 tiff:PhotometricInterpretation: 2 @@ -599,6 +615,7 @@ bumpslope-cdf.exr : 64 x 64, 6 channel, half openexr uvslopes_scale: 0 wrapmodes: "black,black" oiio:AverageColor: "0.499779,-0.000457942,-4.17233e-05,0.00197116,0.00178894,3.45764e-05" + oiio:miplevels: 7 oiio:SHA-1: "49B533110A914CE89BE0B14753A6A4CC037C964F" oiio:subimages: 1 openexr:lineOrder: "increasingY" diff --git a/testsuite/openexr-multires/ref/out.txt b/testsuite/openexr-multires/ref/out.txt index d4281e241b..ea91d1c3d1 100644 --- a/testsuite/openexr-multires/ref/out.txt +++ b/testsuite/openexr-multires/ref/out.txt @@ -15,6 +15,7 @@ Reading ../openexr-images/MultiResolution/Bonita.exr thumbnail_nchannels: 4 thumbnail_width: 100 wrapmodes: "clamp,clamp" + oiio:miplevels: 10 oiio:subimages: 1 openexr:lineOrder: "increasingY" openexr:roundingmode: 0 @@ -34,6 +35,7 @@ Reading ../openexr-images/MultiResolution/ColorCodedLevels.exr screenWindowWidth: 1 textureformat: "Plain Texture" wrapmodes: "periodic,periodic" + oiio:miplevels: 10 oiio:subimages: 1 openexr:lineOrder: "increasingY" openexr:roundingmode: 0 @@ -53,6 +55,7 @@ Reading ../openexr-images/MultiResolution/KernerEnvCube.exr screenWindowCenter: 0, 0 screenWindowWidth: 1 textureformat: "CubeFace Environment" + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -71,6 +74,7 @@ Reading ../openexr-images/MultiResolution/KernerEnvLatLong.exr screenWindowCenter: 0, 0 screenWindowWidth: 1 textureformat: "LatLong Environment" + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 oiio:updirection: "y" @@ -91,6 +95,7 @@ Reading ../openexr-images/MultiResolution/MirrorPattern.exr screenWindowWidth: 1 textureformat: "Plain Texture" wrapmodes: "mirror,mirror" + oiio:miplevels: 10 oiio:subimages: 1 openexr:lineOrder: "increasingY" openexr:roundingmode: 0 @@ -110,6 +115,7 @@ Reading ../openexr-images/MultiResolution/OrientationCube.exr screenWindowCenter: 0, 0 screenWindowWidth: 1 textureformat: "CubeFace Environment" + oiio:miplevels: 12 oiio:sampleborder: 1 oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -128,6 +134,7 @@ Reading ../openexr-images/MultiResolution/OrientationLatLong.exr screenWindowCenter: 0, 0 screenWindowWidth: 1 textureformat: "LatLong Environment" + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 oiio:updirection: "y" @@ -148,6 +155,7 @@ Reading ../openexr-images/MultiResolution/PeriodicPattern.exr screenWindowWidth: 1 textureformat: "Plain Texture" wrapmodes: "periodic,periodic" + oiio:miplevels: 10 oiio:subimages: 1 openexr:lineOrder: "increasingY" openexr:roundingmode: 0 @@ -170,6 +178,7 @@ Reading ../openexr-images/MultiResolution/StageEnvCube.exr thumbnail_height: 180 thumbnail_nchannels: 4 thumbnail_width: 30 + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -191,6 +200,7 @@ Reading ../openexr-images/MultiResolution/StageEnvLatLong.exr thumbnail_height: 50 thumbnail_nchannels: 4 thumbnail_width: 100 + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 oiio:updirection: "y" @@ -212,6 +222,7 @@ Reading ../openexr-images/MultiResolution/WavyLinesCube.exr screenWindowCenter: 0, 0 screenWindowWidth: 1 textureformat: "CubeFace Environment" + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 openexr:lineOrder: "increasingY" @@ -230,6 +241,7 @@ Reading ../openexr-images/MultiResolution/WavyLinesLatLong.exr screenWindowCenter: 0, 0 screenWindowWidth: 1 textureformat: "LatLong Environment" + oiio:miplevels: 11 oiio:sampleborder: 1 oiio:subimages: 1 oiio:updirection: "y" @@ -325,6 +337,7 @@ Reading ../openexr-images/MultiView/Impact.exr wrapmodes: "clamp,clamp" XResolution: 100 YResolution: 100 + oiio:miplevels: 10 oiio:subimages: 1 openexr:lineOrder: "increasingY" openexr:roundingmode: 0 diff --git a/testsuite/python-imagebuf/ref/out.txt b/testsuite/python-imagebuf/ref/out.txt index 00a6ddb77c..da3669fff1 100644 --- a/testsuite/python-imagebuf/ref/out.txt +++ b/testsuite/python-imagebuf/ref/out.txt @@ -35,6 +35,7 @@ Constructing from a bare numpy array: from 0-d array has_error: True Testing read of ../common/textures/grid.tx: +miplevel: 0 / 11 channels: 4 name: ../common/textures/grid.tx file_format_name: tiff @@ -74,6 +75,7 @@ Printing the whole spec to be sure: planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" oiio:SourceFileFormat = "tiff" @@ -104,6 +106,7 @@ Resetting to a different MIP level: planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" oiio:SourceFileFormat = "tiff" @@ -254,6 +257,12 @@ Testing error handling for out-of-range subimage, miplevel tahoe-tiny.tif subimage 0 mip 0: True tahoe-tiny.tif subimage 0 mip 1: False Could not seek to subimage=0 miplevel=1 +Testing the number of miplevels + ../common/bayer.png nmiplevels: 1 + ../common/grid-small.exr nmiplevels: 1 + ../common/textures/grid.tx nmiplevels: 11 + ../common/tahoe-tiny.tif nmiplevels: 1 + Done. Comparing "out.tif" and "ref/out.tif" PASS diff --git a/testsuite/python-imagebuf/src/test_imagebuf.py b/testsuite/python-imagebuf/src/test_imagebuf.py index 5469227e6d..2aefea47a8 100755 --- a/testsuite/python-imagebuf/src/test_imagebuf.py +++ b/testsuite/python-imagebuf/src/test_imagebuf.py @@ -222,6 +222,14 @@ def test_outofrange_subimage_miplevel() : print(" ", f, "subimage 0 mip 1:", ok, buf.geterror()) +# Test for the number of MIP levels. +def test_nmiplevels(): + print("\nTesting the number of miplevels") + for f in ["../common/bayer.png", "../common/grid-small.exr", + "../common/textures/grid.tx", "../common/tahoe-tiny.tif"]: + buf = oiio.ImageBuf(f, 0, 0) + print(" ", f, "nmiplevels:", buf.nmiplevels) + ###################################################################### # main test starts here @@ -349,6 +357,7 @@ def test_outofrange_subimage_miplevel() : test_copy_metadata () test_repr_png () test_outofrange_subimage_miplevel () + test_nmiplevels() print ("\nDone.") except Exception as detail: diff --git a/testsuite/python-imageinput/ref/out-alt.txt b/testsuite/python-imageinput/ref/out-alt.txt index c9b164ae67..864dfab245 100644 --- a/testsuite/python-imageinput/ref/out-alt.txt +++ b/testsuite/python-imageinput/ref/out-alt.txt @@ -62,6 +62,7 @@ Opened "grid.tx" as a tiff planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" Subimage 0 MIP level 1 : diff --git a/testsuite/python-imageinput/ref/out-alt2.txt b/testsuite/python-imageinput/ref/out-alt2.txt index 3440fabee1..40d958a164 100644 --- a/testsuite/python-imageinput/ref/out-alt2.txt +++ b/testsuite/python-imageinput/ref/out-alt2.txt @@ -62,6 +62,7 @@ Opened "grid.tx" as a tiff planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" Subimage 0 MIP level 1 : diff --git a/testsuite/python-imageinput/ref/out-py37-jpeg9d.txt b/testsuite/python-imageinput/ref/out-py37-jpeg9d.txt index 2231776475..bd7a395531 100644 --- a/testsuite/python-imageinput/ref/out-py37-jpeg9d.txt +++ b/testsuite/python-imageinput/ref/out-py37-jpeg9d.txt @@ -65,6 +65,7 @@ Opened "grid.tx" as a tiff planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" Subimage 0 MIP level 1 : diff --git a/testsuite/python-imageinput/ref/out-python3-win-2.txt b/testsuite/python-imageinput/ref/out-python3-win-2.txt index 13ce3fc767..9fa3945089 100644 --- a/testsuite/python-imageinput/ref/out-python3-win-2.txt +++ b/testsuite/python-imageinput/ref/out-python3-win-2.txt @@ -62,6 +62,7 @@ Opened "grid.tx" as a tiff planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" Subimage 0 MIP level 1 : diff --git a/testsuite/python-imageinput/ref/out-python3-win.txt b/testsuite/python-imageinput/ref/out-python3-win.txt index 691369dd18..8f50d97711 100644 --- a/testsuite/python-imageinput/ref/out-python3-win.txt +++ b/testsuite/python-imageinput/ref/out-python3-win.txt @@ -65,6 +65,7 @@ Opened "grid.tx" as a tiff planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" Subimage 0 MIP level 1 : diff --git a/testsuite/python-imageinput/ref/out.txt b/testsuite/python-imageinput/ref/out.txt index 86f75969a6..4f06a688ac 100644 --- a/testsuite/python-imageinput/ref/out.txt +++ b/testsuite/python-imageinput/ref/out.txt @@ -65,6 +65,7 @@ Opened "grid.tx" as a tiff planarconfig = "contig" compression = "zip" PixelAspectRatio = 1.0 + oiio:miplevels = 11 oiio:AverageColor = "0.608983,0.608434,0.608728,1" oiio:SHA-1 = "233A1D3412A54A5F49814AB7BFFD04F56F46D3D7" Subimage 0 MIP level 1 :