From 26533d0a33b12a5880e90a17b515801e19e1d62c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 5 Apr 2024 16:12:16 +0200 Subject: [PATCH 01/27] R3D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/iv/imageviewer.cpp | 3 +- src/libOpenImageIO/imageioplugin.cpp | 4 + src/r3d.imageio/r3dinput.cpp | 424 +++++++++++++++++++++++++++ 3 files changed, 430 insertions(+), 1 deletion(-) diff --git a/src/iv/imageviewer.cpp b/src/iv/imageviewer.cpp index 903fe4ca58..aa9ff8591d 100644 --- a/src/iv/imageviewer.cpp +++ b/src/iv/imageviewer.cpp @@ -64,7 +64,7 @@ IsSpecSrgb(const ImageSpec& spec) static const char *s_file_filters = "" "Image Files (*.bmp *.cin *.dcm *.dds *.dpx *.fits *.gif *.hdr *.ico *.iff " "*.jpg *.jpe *.jpeg *.jif *.jfif *.jfi *.jp2 *.j2k *.jxl *.exr *.png *.pbm *.pgm " - "*.ppm *.psd *.ptex *.rla *.sgi *.rgb *.rgba *.bw *.int *.inta *.pic *.tga " + "*.ppm *.psd *.ptex *.R3D *.r3d *.rla *.sgi *.rgb *.rgba *.bw *.int *.inta *.pic *.tga " "*.tpic *.tif *.tiff *.tx *.env *.sm *.vsm *.vdb *.webp *.zfile);;" "BMP (*.bmp);;" "Cineon (*.cin);;" @@ -85,6 +85,7 @@ static const char *s_file_filters = "" "Portable Network Graphics (*.png);;" "PNM / Netpbm (*.pbm *.pgm *.ppm);;" "Ptex (*.ptex);;" + "R3D (*.R3D *.r3d);;" "RLA (*.rla);;" "SGI (*.sgi *.rgb *.rgba *.bw *.int *.inta);;" "Softimage PIC (*.pic);;" diff --git a/src/libOpenImageIO/imageioplugin.cpp b/src/libOpenImageIO/imageioplugin.cpp index 7fd273f3c0..9ad45042e3 100644 --- a/src/libOpenImageIO/imageioplugin.cpp +++ b/src/libOpenImageIO/imageioplugin.cpp @@ -288,6 +288,7 @@ PLUGENTRY(png); PLUGENTRY(pnm); PLUGENTRY_RO(psd); PLUGENTRY_RO(ptex); +PLUGENTRY_RO(r3d); PLUGENTRY_RO(raw); PLUGENTRY(rla); PLUGENTRY(sgi); @@ -404,6 +405,9 @@ catalog_builtin_plugins() #if defined(USE_PTEX) && !defined(DISABLE_PTEX) DECLAREPLUG_RO (ptex); #endif +#if defined(USE_R3DSDK) && !defined(DISABLE_R3D) + DECLAREPLUG_RO (r3d); +#endif #if defined(USE_LIBRAW) && !defined(DISABLE_RAW) DECLAREPLUG_RO (raw); #endif diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index e69de29bb2..31564baf5a 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -0,0 +1,424 @@ +// Copyright Contributors to the OpenImageIO project. +// SPDX-License-Identifier: Apache-2.0 +// https://github.com/AcademySoftwareFoundation/OpenImageIO + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +unsigned char * AlignedMalloc(size_t & sizeNeeded) +{ + // alloc 15 bytes more to make sure we can align the buffer in case it isn't + unsigned char * buffer = (unsigned char *)malloc(sizeNeeded + 15U); + + if (!buffer) + return nullptr; + + sizeNeeded = 0U; + + // cast to a 32-bit or 64-bit (depending on platform) integer so we can do the math + uintptr_t ptr = (uintptr_t)buffer; + + // check if it's already aligned, if it is we're done + if ((ptr % 16U) == 0U) + return buffer; + + // calculate how many bytes we need + sizeNeeded = 16U - (ptr % 16U); + + return buffer + sizeNeeded; +} + +OIIO_PLUGIN_NAMESPACE_BEGIN + +#define DBG if (1) + +class R3dInput final : public ImageInput { +public: + R3dInput() { initialize(); reset(); } + ~R3dInput() override { close(); terminate(); } + const char* format_name(void) const override { return "r3d"; } + int supports(string_view feature) const override + { + return (feature == "ioproxy"); + } + bool open(const std::string& name, ImageSpec& spec) override; + bool open(const std::string& name, ImageSpec& spec, + const ImageSpec& config) override; + bool seek_subimage(int subimage, int miplevel) override; + bool read_native_scanline(int subimage, int miplevel, int y, int z, + void* data) override; + void read_frame(int pos); + int current_subimage(void) const override + { + lock_guard lock(*this); + return m_subimage; + } + bool close() override; + + const std::string& filename() const { return m_filename; } + + bool seek(int pos); + double fps() const; + int64_t time_stamp(int pos) const; + +private: + std::string m_filename; + std::unique_ptr m_config; // Saved copy of configuration spec + R3DSDK::Clip *m_clip; + R3DSDK::VideoDecodeJob m_job; + unsigned char *m_image_buffer; + size_t m_adjusted; + int m_frames; + int m_channels; + float m_fps; + int m_subimage; + int64_t m_nsubimages; + int m_last_search_pos; + int m_last_decoded_pos; + bool m_read_frame; + int m_next_scanline; + // std::vector m_pixels; + + void initialize(); + void reset() + { + DBG std::cout << "R3dInput::reset()\n"; + + ioproxy_clear(); + m_config.reset(); + m_clip = nullptr; + m_next_scanline = 0; + m_read_frame = false; + m_subimage = 0; + m_last_search_pos = 0; + m_last_decoded_pos = 0; + m_image_buffer = nullptr; + m_adjusted = 0; + } + + void close_file() { reset(); } + void terminate(); +}; + +// Export version number and create function symbols +OIIO_PLUGIN_EXPORTS_BEGIN + +OIIO_EXPORT int r3d_imageio_version = OIIO_PLUGIN_VERSION; + +OIIO_EXPORT const char* +r3d_imageio_library_version() +{ + return "R3D"; +} + +OIIO_EXPORT ImageInput* +r3d_input_imageio_create() +{ + return new R3dInput; +} + +OIIO_EXPORT const char* r3d_input_extensions[] = { "r3d", nullptr }; + +OIIO_PLUGIN_EXPORTS_END + + + +void +R3dInput::initialize() +{ + DBG std::cout << "R3dInput::initialize()\n"; + + // initialize SDK + // R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk(".", OPTION_RED_CUDA); + R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk("/opt/R3DSDKv8_5_1/Redistributable/linux", OPTION_RED_NONE); + if (init_status != R3DSDK::ISInitializeOK) + { + R3DSDK::FinalizeSdk(); + DBG std::cout << "Failed to load R3DSDK Lib: " << init_status << "\n"; + return; + } + + DBG std::cout << "SDK VERSION: " << R3DSDK::GetSdkVersion() << "\n"; +#ifdef GPU + // open CUDA device + RED_CUDA = OpenCUDA(CUDA_DEVICE_ID); + + if (RED_CUDA == NULL) + { + R3DSDK::FinalizeSdk(); + DBG std::cout << "Failed to initialize CUDA\n"; + } +#endif // GPU +} + + + +bool +R3dInput::open(const std::string& name, ImageSpec& newspec, + const ImageSpec& config) +{ + DBG std::cout << "R3dInput::open(name, newspec, config)\n"; + + ioproxy_retrieve_from_config(config); + m_config.reset(new ImageSpec(config)); // save config spec + return open(name, newspec); +} + + + +bool +R3dInput::open(const std::string& name, ImageSpec& newspec) +{ + DBG std::cout << "R3dInput::open(name, newspec)\n"; + + m_filename = name; + + DBG std::cout << "m_filename = " << m_filename << "\n"; + + // load the clip + m_clip = new R3DSDK::Clip(m_filename.c_str()); + + // let the user know if this failed + if (m_clip->Status() != R3DSDK::LSClipLoaded) + { + DBG std::cout << "Error loading " << m_filename << "\n"; + + delete m_clip; + m_clip = nullptr; + return false; + } + + DBG std::cout << "Loaded " << m_filename << "\n"; + + // calculate how much ouput memory we're going to need + size_t width = m_clip->Width(); + size_t height = m_clip->Height(); + + m_channels = 3; + + DBG std::cout << "Video frame count " << m_clip->VideoFrameCount() << "\n"; + + m_frames = m_clip->VideoFrameCount(); + m_nsubimages = m_frames; + + DBG std::cout << "Video framerate " << m_clip->VideoAudioFramerate() << "\n"; + + m_fps = m_clip->VideoAudioFramerate(); + + // three channels (RGB) in 16-bit (2 bytes) requires this much memory: + size_t memNeeded = width * height * m_channels * sizeof(uint16_t); + + // make a copy for AlignedMalloc (it will change it) + m_adjusted = memNeeded; + + // alloc this memory 16-byte aligned + m_image_buffer = AlignedMalloc(m_adjusted); + + if (m_image_buffer == NULL) + { + DBG std::cout << "Failed to allocate " << static_cast(memNeeded) << " bytes of memory for output image\n"; + + return false; + } + + m_job.BytesPerRow = width * sizeof(uint16_t); + + // letting the decoder know how big the buffer is (we do that here + // since AlignedMalloc below will overwrite the value in this + m_job.OutputBufferSize = memNeeded; + + m_job.Mode = R3DSDK::DECODE_FULL_RES_PREMIUM; + + // store the image here + m_job.OutputBuffer = m_image_buffer; + + // store the image in a 16-bit planar RGB format + m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Planar; + // Interleaved RGB decoding in 16-bits per pixel + // m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Interleaved; + + m_spec = ImageSpec(width, height, m_channels, TypeDesc::UINT16); + m_spec.attribute("FramesPerSecond", TypeFloat, &m_fps); + m_spec.attribute("oiio:Movie", true); + m_spec.attribute("oiio:subimages", int(m_frames)); + m_spec.attribute("oiio:BitsPerSample", 16); + + newspec = m_spec; + m_next_scanline = 0; + return true; +} + + + +void +R3dInput::read_frame(int pos) +{ + DBG std::cout << "R3dInput::read_frame(" << pos << ")\n"; + + if (m_last_decoded_pos + 1 != pos) { + seek(pos); + } + + R3DSDK::DecodeStatus status = m_clip->DecodeVideoFrame(pos, m_job); + if (status != R3DSDK::DSDecodeOK) { + DBG std::cout << "Failed to decode frame " << pos << "\n"; + } + + m_last_search_pos = pos; + m_last_decoded_pos = pos; + m_read_frame = true; + m_next_scanline = 0; +} + + + +bool +R3dInput::seek_subimage(int subimage, int miplevel) +{ + DBG std::cout << "R3dInput::seek_subimage(" << subimage << ", " << miplevel << ")\n"; + + if (subimage < 0 || subimage >= m_nsubimages || miplevel > 0) { + return false; + } + if (subimage == m_subimage) { + return true; + } + m_subimage = subimage; + m_read_frame = false; + return true; +} + + + +bool +R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, + void* data) +{ + DBG std::cout << "R3dInput::read_native_scanline(, , " << y << ")\n"; + + lock_guard lock(*this); + if (!seek_subimage(subimage, miplevel)) + return false; + if (!m_read_frame) { + read_frame(m_subimage); + } + if (y < 0 || y >= m_spec.height) // out of range scanline + return false; + if (m_next_scanline > y) { + // User is trying to read an earlier scanline than the one we're + // up to. Easy fix: close the file and re-open. + // Don't forget to save and restore any configuration settings. + ImageSpec configsave; + if (m_config) + configsave = *m_config; + ImageSpec dummyspec; + int subimage = current_subimage(); + if (!close() || !open(m_filename, dummyspec, configsave) + || !seek_subimage(subimage, 0)) + return false; // Somehow, the re-open failed + OIIO_DASSERT(m_next_scanline == 0 && current_subimage() == subimage); + } + + uint16_t *r, *g, *b; + uint16_t *d = (uint16_t *)data; + size_t scanline_size = m_spec.width * sizeof(uint16_t); + size_t plane_size = scanline_size * m_spec.height; + + r = (uint16_t *)((uint8_t*)m_image_buffer + y * scanline_size); + g = (uint16_t *)((uint8_t*)m_image_buffer + y * scanline_size + plane_size); + b = (uint16_t *)((uint8_t*)m_image_buffer + y * scanline_size + 2 * plane_size); + + for (int x = 0; x < m_spec.width; x++) + { + *d++ = r[x]; + *d++ = g[x]; + *d++ = b[x]; + } + + return true; +} + + + +bool +R3dInput::seek(int frame) +{ + DBG std::cout << "R3dInput::seek(" << frame << ")\n"; + return true; +} + + + +int64_t +R3dInput::time_stamp(int frame) const +{ + DBG std::cout << "R3dInput::time_stamp(" << frame << ")\n"; + return 0; +} + + + +double +R3dInput::fps() const +{ + DBG std::cout << "R3dInput::fps()\n"; + return (double) m_fps; +} + + + +bool +R3dInput::close() +{ + DBG std::cout << "R3dInput::close()\n"; + + if (m_clip) { + delete m_clip; + m_clip = nullptr; + } + if (m_image_buffer) { + free(m_image_buffer - m_adjusted); + m_image_buffer = nullptr; + m_adjusted = 0; + } + reset(); // Reset to initial state + return true; +} + + + +void +R3dInput::terminate() +{ + DBG std::cout << "R3dInput::terminate()\n"; + R3DSDK::FinalizeSdk(); +} + +OIIO_PLUGIN_NAMESPACE_END From d936e15aab596ac2856ece8ff23308bcd039705e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 5 Apr 2024 17:15:18 +0200 Subject: [PATCH 02/27] clang-format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 104 +++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 47 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 31564baf5a..46ddac7536 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -15,27 +15,28 @@ #include #include -#include -#include #include #include #include +#include +#include -#include -#include #include #include +#include #include #include -#include -#include +#include +#include #include -#include +#include +#include -unsigned char * AlignedMalloc(size_t & sizeNeeded) +unsigned char* +AlignedMalloc(size_t& sizeNeeded) { // alloc 15 bytes more to make sure we can align the buffer in case it isn't - unsigned char * buffer = (unsigned char *)malloc(sizeNeeded + 15U); + unsigned char* buffer = (unsigned char*)malloc(sizeNeeded + 15U); if (!buffer) return nullptr; @@ -47,7 +48,7 @@ unsigned char * AlignedMalloc(size_t & sizeNeeded) // check if it's already aligned, if it is we're done if ((ptr % 16U) == 0U) - return buffer; + return buffer; // calculate how many bytes we need sizeNeeded = 16U - (ptr % 16U); @@ -61,8 +62,16 @@ OIIO_PLUGIN_NAMESPACE_BEGIN class R3dInput final : public ImageInput { public: - R3dInput() { initialize(); reset(); } - ~R3dInput() override { close(); terminate(); } + R3dInput() + { + initialize(); + reset(); + } + ~R3dInput() override + { + close(); + terminate(); + } const char* format_name(void) const override { return "r3d"; } int supports(string_view feature) const override { @@ -91,9 +100,9 @@ class R3dInput final : public ImageInput { private: std::string m_filename; std::unique_ptr m_config; // Saved copy of configuration spec - R3DSDK::Clip *m_clip; + R3DSDK::Clip* m_clip; R3DSDK::VideoDecodeJob m_job; - unsigned char *m_image_buffer; + unsigned char* m_image_buffer; size_t m_adjusted; int m_frames; int m_channels; @@ -113,14 +122,14 @@ class R3dInput final : public ImageInput { ioproxy_clear(); m_config.reset(); - m_clip = nullptr; + m_clip = nullptr; m_next_scanline = 0; m_read_frame = false; m_subimage = 0; m_last_search_pos = 0; m_last_decoded_pos = 0; - m_image_buffer = nullptr; - m_adjusted = 0; + m_image_buffer = nullptr; + m_adjusted = 0; } void close_file() { reset(); } @@ -157,9 +166,10 @@ R3dInput::initialize() // initialize SDK // R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk(".", OPTION_RED_CUDA); - R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk("/opt/R3DSDKv8_5_1/Redistributable/linux", OPTION_RED_NONE); - if (init_status != R3DSDK::ISInitializeOK) - { + R3DSDK::InitializeStatus init_status + = R3DSDK::InitializeSdk("/opt/R3DSDKv8_5_1/Redistributable/linux", + OPTION_RED_NONE); + if (init_status != R3DSDK::ISInitializeOK) { R3DSDK::FinalizeSdk(); DBG std::cout << "Failed to load R3DSDK Lib: " << init_status << "\n"; return; @@ -170,12 +180,11 @@ R3dInput::initialize() // open CUDA device RED_CUDA = OpenCUDA(CUDA_DEVICE_ID); - if (RED_CUDA == NULL) - { + if (RED_CUDA == NULL) { R3DSDK::FinalizeSdk(); DBG std::cout << "Failed to initialize CUDA\n"; } -#endif // GPU +#endif // GPU } @@ -206,8 +215,7 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) m_clip = new R3DSDK::Clip(m_filename.c_str()); // let the user know if this failed - if (m_clip->Status() != R3DSDK::LSClipLoaded) - { + if (m_clip->Status() != R3DSDK::LSClipLoaded) { DBG std::cout << "Error loading " << m_filename << "\n"; delete m_clip; @@ -218,19 +226,20 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) DBG std::cout << "Loaded " << m_filename << "\n"; // calculate how much ouput memory we're going to need - size_t width = m_clip->Width(); + size_t width = m_clip->Width(); size_t height = m_clip->Height(); m_channels = 3; DBG std::cout << "Video frame count " << m_clip->VideoFrameCount() << "\n"; - m_frames = m_clip->VideoFrameCount(); + m_frames = m_clip->VideoFrameCount(); m_nsubimages = m_frames; - DBG std::cout << "Video framerate " << m_clip->VideoAudioFramerate() << "\n"; + DBG std::cout << "Video framerate " << m_clip->VideoAudioFramerate() + << "\n"; - m_fps = m_clip->VideoAudioFramerate(); + m_fps = m_clip->VideoAudioFramerate(); // three channels (RGB) in 16-bit (2 bytes) requires this much memory: size_t memNeeded = width * height * m_channels * sizeof(uint16_t); @@ -241,9 +250,9 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) // alloc this memory 16-byte aligned m_image_buffer = AlignedMalloc(m_adjusted); - if (m_image_buffer == NULL) - { - DBG std::cout << "Failed to allocate " << static_cast(memNeeded) << " bytes of memory for output image\n"; + if (m_image_buffer == NULL) { + DBG std::cout << "Failed to allocate " << static_cast(memNeeded) + << " bytes of memory for output image\n"; return false; } @@ -270,7 +279,7 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) m_spec.attribute("oiio:subimages", int(m_frames)); m_spec.attribute("oiio:BitsPerSample", 16); - newspec = m_spec; + newspec = m_spec; m_next_scanline = 0; return true; } @@ -291,10 +300,10 @@ R3dInput::read_frame(int pos) DBG std::cout << "Failed to decode frame " << pos << "\n"; } - m_last_search_pos = pos; + m_last_search_pos = pos; m_last_decoded_pos = pos; - m_read_frame = true; - m_next_scanline = 0; + m_read_frame = true; + m_next_scanline = 0; } @@ -302,7 +311,8 @@ R3dInput::read_frame(int pos) bool R3dInput::seek_subimage(int subimage, int miplevel) { - DBG std::cout << "R3dInput::seek_subimage(" << subimage << ", " << miplevel << ")\n"; + DBG std::cout << "R3dInput::seek_subimage(" << subimage << ", " << miplevel + << ")\n"; if (subimage < 0 || subimage >= m_nsubimages || miplevel > 0) { return false; @@ -347,21 +357,21 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, } uint16_t *r, *g, *b; - uint16_t *d = (uint16_t *)data; + uint16_t* d = (uint16_t*)data; size_t scanline_size = m_spec.width * sizeof(uint16_t); - size_t plane_size = scanline_size * m_spec.height; + size_t plane_size = scanline_size * m_spec.height; - r = (uint16_t *)((uint8_t*)m_image_buffer + y * scanline_size); - g = (uint16_t *)((uint8_t*)m_image_buffer + y * scanline_size + plane_size); - b = (uint16_t *)((uint8_t*)m_image_buffer + y * scanline_size + 2 * plane_size); + r = (uint16_t*)((uint8_t*)m_image_buffer + y * scanline_size); + g = (uint16_t*)((uint8_t*)m_image_buffer + y * scanline_size + plane_size); + b = (uint16_t*)((uint8_t*)m_image_buffer + y * scanline_size + + 2 * plane_size); - for (int x = 0; x < m_spec.width; x++) - { + for (int x = 0; x < m_spec.width; x++) { *d++ = r[x]; *d++ = g[x]; *d++ = b[x]; } - + return true; } @@ -389,7 +399,7 @@ double R3dInput::fps() const { DBG std::cout << "R3dInput::fps()\n"; - return (double) m_fps; + return (double)m_fps; } @@ -406,7 +416,7 @@ R3dInput::close() if (m_image_buffer) { free(m_image_buffer - m_adjusted); m_image_buffer = nullptr; - m_adjusted = 0; + m_adjusted = 0; } reset(); // Reset to initial state return true; From c7629180d50a5d1d94cd125ce15c7698bce7f9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Tue, 9 Apr 2024 17:41:06 +0200 Subject: [PATCH 03/27] Add instructions fro R3D SDK download and configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 46ddac7536..4ac64193cf 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -2,6 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // https://github.com/AcademySoftwareFoundation/OpenImageIO +// R3D SDK can be downloaded from the following site: +// https://www.red.com/download/r3d-sdk +// +// The code has been tested with the version 8.5.1 installed in +// /opt/R3DSDKv8_5_1 directory and setting up the variable +// export R3DSDK_ROOT="/opt/R3DSDKv8_5_1" + #include #include #include From 8c03a50d56a06d2216548df4c631062e609fc87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sat, 13 Apr 2024 15:05:58 +0200 Subject: [PATCH 04/27] Add macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/cmake/modules/FindR3DSDK.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmake/modules/FindR3DSDK.cmake b/src/cmake/modules/FindR3DSDK.cmake index 3935161d5d..d5ad128983 100644 --- a/src/cmake/modules/FindR3DSDK.cmake +++ b/src/cmake/modules/FindR3DSDK.cmake @@ -48,6 +48,7 @@ endif() set(R3DSDK_INCLUDE_DIR ${R3DSDK_ROOT}/Include) find_library(R3DSDK_LIBRARY NAMES ${R3DSDK_LIB_NAME} PATHS ${R3DSDK_ROOT}/Lib/linux64/ + ${R3DSDK_ROOT}/Lib/mac64/ ${R3DSDK_ROOT}/Lib/win64/ NO_DEFAULT_PATH ) @@ -62,6 +63,9 @@ if(R3DSDK_FOUND) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(R3DSDK_LIBRARIES ${R3DSDK_LIBRARY} dl) set(R3DSDK_RUNTIME_LIBRARIES ${R3DSDK_ROOT}/Redistributable/linux) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(R3DSDK_LIBRARIES ${R3DSDK_LIBRARY} dl) + set(R3DSDK_RUNTIME_LIBRARIES ${R3DSDK_ROOT}/Redistributable/mac) else() set(R3DSDK_LIBRARIES ${R3DSDK_LIBRARY}) set(R3DSDK_RUNTIME_LIBRARIES ${R3DSDK_ROOT}/Redistributable/win) From 2f9fa7802de7b3d253f2d6b0ba448d54ceebee2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sun, 14 Apr 2024 19:46:11 +0200 Subject: [PATCH 05/27] Added conditional compiling of the various decoders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is intended to control compilation options in the future. Stay tuned. Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 4ac64193cf..c9ef4607e8 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -19,7 +19,17 @@ #include #include +#ifdef GPU +#ifdef CUDA #include +#endif // CUDA +#ifdef OpenCL +#include +#endif // OpenCL +#ifdef Metal +#include +#endif // Metal +#endif // GPU #include #include From 849e138d2a053c56f775f464f9da49dbf4c474b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sun, 14 Apr 2024 19:49:22 +0200 Subject: [PATCH 06/27] Correction for the forgotten header file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index c9ef4607e8..3240591a91 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -35,7 +35,11 @@ #include #include #include +#ifdef GPU +#ifdef CUDA #include +#endif // CUDA +#endif // GPU #include #include From faf4c9696938a78cb7189b5e6c7cf1321e937d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Tue, 16 Apr 2024 12:52:18 +0200 Subject: [PATCH 07/27] Modified the R3D SDK CMake module for macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/cmake/modules/FindR3DSDK.cmake | 38 +++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/cmake/modules/FindR3DSDK.cmake b/src/cmake/modules/FindR3DSDK.cmake index d5ad128983..3bca88bb3c 100644 --- a/src/cmake/modules/FindR3DSDK.cmake +++ b/src/cmake/modules/FindR3DSDK.cmake @@ -20,21 +20,28 @@ include (FindPackageHandleStandardArgs) # Assuming only C++11 and 64 bit support is needed. # Set R3DSDK_LIB_NAME before invoking this file to override. if (NOT DEFINED R3DSDK_LIB_NAME) - set(R3DSDK_LIB_NAME R3DSDKPIC-cpp11) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(R3DSDK_LIB_NAME R3DSDKPIC-cpp11) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(R3DSDK_LIB_NAME R3DSDK-libcpp) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set(R3DSDK_LIB_NAME R3DSDK-2017MT) + endif() endif() if(DEFINED ENV{R3DSDK_ROOT}) set(R3DSDK_ROOT $ENV{R3DSDK_ROOT}) - # message("Using R3D SDK Root: " ${R3DSDK_ROOT}) + message("Using R3D SDK Root: " ${R3DSDK_ROOT}) else() - # message("Looking for R3D SDK") + message("Looking for R3D SDK") # The R3D SDK is supplied as a zip file that you can unpack anywhere. # So try some plausible locations and hope for the best. # Use a glob to try and avoid dealing with exact SDK version numbers. file(GLOB R3DSDK_PATHS "/opt/R3DSDKv*" + "/Library/R3DSDKv*" "C:/R3DSDKv*" ${CMAKE_CURRENT_SOURCE_DIR}/../R3DSDKv* ${CMAKE_CURRENT_SOURCE_DIR}/../../R3DSDKv* @@ -46,19 +53,28 @@ else() endif() set(R3DSDK_INCLUDE_DIR ${R3DSDK_ROOT}/Include) -find_library(R3DSDK_LIBRARY NAMES ${R3DSDK_LIB_NAME} - PATHS ${R3DSDK_ROOT}/Lib/linux64/ - ${R3DSDK_ROOT}/Lib/mac64/ - ${R3DSDK_ROOT}/Lib/win64/ - NO_DEFAULT_PATH - ) +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + find_library(R3DSDK_LIBRARY NAMES ${R3DSDK_LIB_NAME} + PATHS ${R3DSDK_ROOT}/Lib/linux64/ + NO_DEFAULT_PATH + ) +elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + find_library(R3DSDK_LIBRARY NAMES ${R3DSDK_LIB_NAME} + PATHS ${R3DSDK_ROOT}/Lib/mac64/ + NO_DEFAULT_PATH + ) +elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + find_library(R3DSDK_LIBRARY NAMES ${R3DSDK_LIB_NAME} + PATHS ${R3DSDK_ROOT}/Lib/win64/ + NO_DEFAULT_PATH + ) +endif() # handle the QUIETLY and REQUIRED arguments and set R3DSDK_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(R3DSDK DEFAULT_MSG R3DSDK_LIBRARY R3DSDK_INCLUDE_DIR) -# TODO : Ask somebody with a Mac to add support. if(R3DSDK_FOUND) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") set(R3DSDK_LIBRARIES ${R3DSDK_LIBRARY} dl) @@ -66,7 +82,7 @@ if(R3DSDK_FOUND) elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") set(R3DSDK_LIBRARIES ${R3DSDK_LIBRARY} dl) set(R3DSDK_RUNTIME_LIBRARIES ${R3DSDK_ROOT}/Redistributable/mac) - else() + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") set(R3DSDK_LIBRARIES ${R3DSDK_LIBRARY}) set(R3DSDK_RUNTIME_LIBRARIES ${R3DSDK_ROOT}/Redistributable/win) endif() From a0309e565417ceb074b3f1eec0be69b0c64e9b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Tue, 16 Apr 2024 18:14:36 +0200 Subject: [PATCH 08/27] clang-format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 3240591a91..9dde662c96 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -20,26 +20,26 @@ #include #ifdef GPU -#ifdef CUDA -#include -#endif // CUDA -#ifdef OpenCL -#include -#endif // OpenCL -#ifdef Metal -#include -#endif // Metal -#endif // GPU +# ifdef CUDA +# include +# endif // CUDA +# ifdef OpenCL +# include +# endif // OpenCL +# ifdef Metal +# include +# endif // Metal +#endif // GPU #include #include #include #include #ifdef GPU -#ifdef CUDA -#include -#endif // CUDA -#endif // GPU +# ifdef CUDA +# include +# endif // CUDA +#endif // GPU #include #include From 072572d9385cfaa3500ae1dc9015acf9071b1720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Tue, 16 Apr 2024 19:40:19 +0200 Subject: [PATCH 09/27] Improvede debugging controlled by OIIO_COLOR_DEBUG=1 environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 59 ++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 9dde662c96..bede068b40 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include @@ -79,7 +81,14 @@ AlignedMalloc(size_t& sizeNeeded) OIIO_PLUGIN_NAMESPACE_BEGIN -#define DBG if (1) +#if 0 || !defined(NDEBUG) /* allow color configuration debugging */ +static bool colordebug = Strutil::stoi(Sysutil::getenv("OIIO_COLOR_DEBUG")); +# define DBG(...) \ + if (colordebug) \ + Strutil::print(__VA_ARGS__) +#else +# define DBG(...) +#endif class R3dInput final : public ImageInput { public: @@ -139,7 +148,7 @@ class R3dInput final : public ImageInput { void initialize(); void reset() { - DBG std::cout << "R3dInput::reset()\n"; + DBG("R3dInput::reset()\n"); ioproxy_clear(); m_config.reset(); @@ -183,7 +192,7 @@ OIIO_PLUGIN_EXPORTS_END void R3dInput::initialize() { - DBG std::cout << "R3dInput::initialize()\n"; + DBG("R3dInput::initialize()\n"); // initialize SDK // R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk(".", OPTION_RED_CUDA); @@ -192,18 +201,18 @@ R3dInput::initialize() OPTION_RED_NONE); if (init_status != R3DSDK::ISInitializeOK) { R3DSDK::FinalizeSdk(); - DBG std::cout << "Failed to load R3DSDK Lib: " << init_status << "\n"; + DBG("Failed to load R3DSDK Library\n"); return; } - DBG std::cout << "SDK VERSION: " << R3DSDK::GetSdkVersion() << "\n"; + DBG("SDK VERSION: {}\n", R3DSDK::GetSdkVersion()); #ifdef GPU // open CUDA device RED_CUDA = OpenCUDA(CUDA_DEVICE_ID); if (RED_CUDA == NULL) { R3DSDK::FinalizeSdk(); - DBG std::cout << "Failed to initialize CUDA\n"; + DBG("Failed to initialize CUDA\n"); } #endif // GPU } @@ -214,7 +223,7 @@ bool R3dInput::open(const std::string& name, ImageSpec& newspec, const ImageSpec& config) { - DBG std::cout << "R3dInput::open(name, newspec, config)\n"; + DBG("R3dInput::open(name, newspec, config)\n"); ioproxy_retrieve_from_config(config); m_config.reset(new ImageSpec(config)); // save config spec @@ -226,25 +235,25 @@ R3dInput::open(const std::string& name, ImageSpec& newspec, bool R3dInput::open(const std::string& name, ImageSpec& newspec) { - DBG std::cout << "R3dInput::open(name, newspec)\n"; + DBG("R3dInput::open(name, newspec)\n"); m_filename = name; - DBG std::cout << "m_filename = " << m_filename << "\n"; + DBG("m_filename = {}\n", m_filename); // load the clip m_clip = new R3DSDK::Clip(m_filename.c_str()); // let the user know if this failed if (m_clip->Status() != R3DSDK::LSClipLoaded) { - DBG std::cout << "Error loading " << m_filename << "\n"; + DBG("Error loading {}\n", m_filename); delete m_clip; m_clip = nullptr; return false; } - DBG std::cout << "Loaded " << m_filename << "\n"; + DBG("Loaded {}\n", m_filename); // calculate how much ouput memory we're going to need size_t width = m_clip->Width(); @@ -252,13 +261,12 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) m_channels = 3; - DBG std::cout << "Video frame count " << m_clip->VideoFrameCount() << "\n"; + DBG("Video frame count {}\n", m_clip->VideoFrameCount()); m_frames = m_clip->VideoFrameCount(); m_nsubimages = m_frames; - DBG std::cout << "Video framerate " << m_clip->VideoAudioFramerate() - << "\n"; + DBG("Video framerate {}\n", m_clip->VideoAudioFramerate()); m_fps = m_clip->VideoAudioFramerate(); @@ -272,8 +280,8 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) m_image_buffer = AlignedMalloc(m_adjusted); if (m_image_buffer == NULL) { - DBG std::cout << "Failed to allocate " << static_cast(memNeeded) - << " bytes of memory for output image\n"; + DBG("Failed to allocate {} bytes of memory for output image\n", + static_cast(memNeeded)); return false; } @@ -310,7 +318,7 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) void R3dInput::read_frame(int pos) { - DBG std::cout << "R3dInput::read_frame(" << pos << ")\n"; + DBG("R3dInput::read_frame({})\n", pos); if (m_last_decoded_pos + 1 != pos) { seek(pos); @@ -318,7 +326,7 @@ R3dInput::read_frame(int pos) R3DSDK::DecodeStatus status = m_clip->DecodeVideoFrame(pos, m_job); if (status != R3DSDK::DSDecodeOK) { - DBG std::cout << "Failed to decode frame " << pos << "\n"; + DBG("Failed to decode frame {}\n", pos); } m_last_search_pos = pos; @@ -332,8 +340,7 @@ R3dInput::read_frame(int pos) bool R3dInput::seek_subimage(int subimage, int miplevel) { - DBG std::cout << "R3dInput::seek_subimage(" << subimage << ", " << miplevel - << ")\n"; + DBG("R3dInput::seek_subimage({}, {})\n", subimage, miplevel); if (subimage < 0 || subimage >= m_nsubimages || miplevel > 0) { return false; @@ -352,7 +359,7 @@ bool R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, void* data) { - DBG std::cout << "R3dInput::read_native_scanline(, , " << y << ")\n"; + DBG("R3dInput::read_native_scanline(, , {})\n", y); lock_guard lock(*this); if (!seek_subimage(subimage, miplevel)) @@ -401,7 +408,7 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, bool R3dInput::seek(int frame) { - DBG std::cout << "R3dInput::seek(" << frame << ")\n"; + DBG("R3dInput::seek({})\n", frame); return true; } @@ -410,7 +417,7 @@ R3dInput::seek(int frame) int64_t R3dInput::time_stamp(int frame) const { - DBG std::cout << "R3dInput::time_stamp(" << frame << ")\n"; + DBG("R3dInput::time_stamp({})\n", frame); return 0; } @@ -419,7 +426,7 @@ R3dInput::time_stamp(int frame) const double R3dInput::fps() const { - DBG std::cout << "R3dInput::fps()\n"; + DBG("R3dInput::fps()\n"); return (double)m_fps; } @@ -428,7 +435,7 @@ R3dInput::fps() const bool R3dInput::close() { - DBG std::cout << "R3dInput::close()\n"; + DBG("R3dInput::close()\n"); if (m_clip) { delete m_clip; @@ -448,7 +455,7 @@ R3dInput::close() void R3dInput::terminate() { - DBG std::cout << "R3dInput::terminate()\n"; + DBG("R3dInput::terminate()\n"); R3DSDK::FinalizeSdk(); } From cbf7579da958cbbb92889994bc8c90fadd930a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Tue, 16 Apr 2024 22:10:31 +0200 Subject: [PATCH 10/27] Use aligned_malloc() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index bede068b40..c87ab4466d 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -55,30 +55,6 @@ #include #include -unsigned char* -AlignedMalloc(size_t& sizeNeeded) -{ - // alloc 15 bytes more to make sure we can align the buffer in case it isn't - unsigned char* buffer = (unsigned char*)malloc(sizeNeeded + 15U); - - if (!buffer) - return nullptr; - - sizeNeeded = 0U; - - // cast to a 32-bit or 64-bit (depending on platform) integer so we can do the math - uintptr_t ptr = (uintptr_t)buffer; - - // check if it's already aligned, if it is we're done - if ((ptr % 16U) == 0U) - return buffer; - - // calculate how many bytes we need - sizeNeeded = 16U - (ptr % 16U); - - return buffer + sizeNeeded; -} - OIIO_PLUGIN_NAMESPACE_BEGIN #if 0 || !defined(NDEBUG) /* allow color configuration debugging */ @@ -133,7 +109,6 @@ class R3dInput final : public ImageInput { R3DSDK::Clip* m_clip; R3DSDK::VideoDecodeJob m_job; unsigned char* m_image_buffer; - size_t m_adjusted; int m_frames; int m_channels; float m_fps; @@ -159,7 +134,6 @@ class R3dInput final : public ImageInput { m_last_search_pos = 0; m_last_decoded_pos = 0; m_image_buffer = nullptr; - m_adjusted = 0; } void close_file() { reset(); } @@ -273,11 +247,8 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) // three channels (RGB) in 16-bit (2 bytes) requires this much memory: size_t memNeeded = width * height * m_channels * sizeof(uint16_t); - // make a copy for AlignedMalloc (it will change it) - m_adjusted = memNeeded; - // alloc this memory 16-byte aligned - m_image_buffer = AlignedMalloc(m_adjusted); + m_image_buffer = static_cast(aligned_malloc(memNeeded, 16)); if (m_image_buffer == NULL) { DBG("Failed to allocate {} bytes of memory for output image\n", @@ -442,9 +413,8 @@ R3dInput::close() m_clip = nullptr; } if (m_image_buffer) { - free(m_image_buffer - m_adjusted); + aligned_free(m_image_buffer); m_image_buffer = nullptr; - m_adjusted = 0; } reset(); // Reset to initial state return true; From d8f600a0b2ac2a079154fbedc9d05a34afd91546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Wed, 17 Apr 2024 19:49:31 +0200 Subject: [PATCH 11/27] Use copy_image() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index c87ab4466d..67a5e0f312 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -118,7 +118,6 @@ class R3dInput final : public ImageInput { int m_last_decoded_pos; bool m_read_frame; int m_next_scanline; - // std::vector m_pixels; void initialize(); void reset() @@ -330,7 +329,7 @@ bool R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, void* data) { - DBG("R3dInput::read_native_scanline(, , {})\n", y); + DBG("R3dInput::read_native_scanline({}, {}, {})\n", subimage, miplevel, y); lock_guard lock(*this); if (!seek_subimage(subimage, miplevel)) @@ -355,6 +354,7 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, OIIO_DASSERT(m_next_scanline == 0 && current_subimage() == subimage); } +#ifdef PLANAR uint16_t *r, *g, *b; uint16_t* d = (uint16_t*)data; size_t scanline_size = m_spec.width * sizeof(uint16_t); @@ -372,6 +372,26 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, } return true; +#else + bool result; + + for (int channel = 0; channel < m_spec.nchannels; channel++) { + result = copy_image(1, m_spec.width, 1, m_spec.depth, + m_image_buffer + y * m_spec.width * sizeof(uint16_t) + + channel * m_spec.width * m_spec.height + * sizeof(uint16_t), + sizeof(uint16_t), sizeof(uint16_t), + m_spec.width * sizeof(uint16_t), + m_spec.width * m_spec.height * sizeof(uint16_t), + (void*)((uint16_t*)data + channel), + m_spec.nchannels * sizeof(uint16_t), + m_spec.nchannels * m_spec.width * sizeof(uint16_t), + AutoStride); + if (!result) + return result; + } + return true; +#endif // PLANAR } From 6c42d2db0372ee2843676d9657c14d3336f5de81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Wed, 17 Apr 2024 20:59:47 +0200 Subject: [PATCH 12/27] Use OIIO_R3D_LIBRARY_PATH environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 67a5e0f312..18eed0eb6f 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -167,11 +168,22 @@ R3dInput::initialize() { DBG("R3dInput::initialize()\n"); + std::string library_path + = Sysutil::getenv("OIIO_R3D_LIBRARY_PATH", +#if defined(__linux__) + "/opt/R3DSDKv8_5_1/Redistributable/linux" +#elif defined(__APPLE__) + "/Library/R3DSDKv8_5_1/Redistributable/mac" +#elif defined(__WINDOWS__) + "C:\\R3DSDKv8_5_1\\Redistributable\\win" +#else +#error "Unknown OS" +#endif + ); // initialize SDK // R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk(".", OPTION_RED_CUDA); R3DSDK::InitializeStatus init_status - = R3DSDK::InitializeSdk("/opt/R3DSDKv8_5_1/Redistributable/linux", - OPTION_RED_NONE); + = R3DSDK::InitializeSdk(library_path.c_str(), OPTION_RED_NONE); if (init_status != R3DSDK::ISInitializeOK) { R3DSDK::FinalizeSdk(); DBG("Failed to load R3DSDK Library\n"); From 08dc3667fdea01184d4ff2f1c54824c5cde46737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Wed, 17 Apr 2024 21:16:11 +0200 Subject: [PATCH 13/27] clang-format as usual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 18eed0eb6f..5d81462cd9 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -177,7 +177,7 @@ R3dInput::initialize() #elif defined(__WINDOWS__) "C:\\R3DSDKv8_5_1\\Redistributable\\win" #else -#error "Unknown OS" +# error "Unknown OS" #endif ); // initialize SDK From 8f7b3af9781b7eb80e928203be374a57b42784d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Wed, 17 Apr 2024 21:20:35 +0200 Subject: [PATCH 14/27] clang-format one more time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 5d81462cd9..a4898556b2 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -179,7 +179,7 @@ R3dInput::initialize() #else # error "Unknown OS" #endif - ); + ); // initialize SDK // R3DSDK::InitializeStatus init_status = R3DSDK::InitializeSdk(".", OPTION_RED_CUDA); R3DSDK::InitializeStatus init_status From e8e7b39ae25514917dd53bc31439f43ab4b26da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Thu, 18 Apr 2024 13:07:09 +0200 Subject: [PATCH 15/27] Use interleaved RGB channels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index a4898556b2..b85c5e7037 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -256,7 +256,7 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) m_fps = m_clip->VideoAudioFramerate(); // three channels (RGB) in 16-bit (2 bytes) requires this much memory: - size_t memNeeded = width * height * m_channels * sizeof(uint16_t); + size_t memNeeded = m_channels * width * height * sizeof(uint16_t); // alloc this memory 16-byte aligned m_image_buffer = static_cast(aligned_malloc(memNeeded, 16)); @@ -268,8 +268,6 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) return false; } - m_job.BytesPerRow = width * sizeof(uint16_t); - // letting the decoder know how big the buffer is (we do that here // since AlignedMalloc below will overwrite the value in this m_job.OutputBufferSize = memNeeded; @@ -280,9 +278,14 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) m_job.OutputBuffer = m_image_buffer; // store the image in a 16-bit planar RGB format - m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Planar; +#ifdef PLANAR + m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Planar; + m_job.BytesPerRow = width * sizeof(uint16_t); +#else // Interleaved RGB decoding in 16-bits per pixel - // m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Interleaved; + m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Interleaved; + m_job.BytesPerRow = m_channels * width * sizeof(uint16_t); +#endif // PLANAR m_spec = ImageSpec(width, height, m_channels, TypeDesc::UINT16); m_spec.attribute("FramesPerSecond", TypeFloat, &m_fps); @@ -384,7 +387,7 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, } return true; -#else +#elif defined(PLANAR_COPY_IMAGE) bool result; for (int channel = 0; channel < m_spec.nchannels; channel++) { @@ -403,7 +406,13 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, return result; } return true; -#endif // PLANAR +#else + return copy_image( + m_spec.nchannels, m_spec.width, 1, m_spec.depth, + m_image_buffer + y * m_spec.nchannels * m_spec.width * sizeof(uint16_t), + m_spec.nchannels * sizeof(uint16_t), AutoStride, AutoStride, AutoStride, + data, AutoStride, AutoStride, AutoStride); +#endif // PLANAR } From 6e071e9b3167f9b0bc786acd29bd6fe1b55a443b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sat, 20 Apr 2024 18:08:27 +0200 Subject: [PATCH 16/27] Report the R3D library version as a plug-in version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index b85c5e7037..d545854b48 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -148,7 +148,8 @@ OIIO_EXPORT int r3d_imageio_version = OIIO_PLUGIN_VERSION; OIIO_EXPORT const char* r3d_imageio_library_version() { - return "R3D"; + // Note: SDK version can differ from the actual library loaded + return "R3D 8.5.1"; } OIIO_EXPORT ImageInput* From 34aee60553fd5e4638ad58d32e637bcd243c018e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sat, 20 Apr 2024 18:11:47 +0200 Subject: [PATCH 17/27] Get rid of the planar decoding configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 45 ------------------------------------ 1 file changed, 45 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index d545854b48..b54b1d5432 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -278,15 +278,9 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) // store the image here m_job.OutputBuffer = m_image_buffer; - // store the image in a 16-bit planar RGB format -#ifdef PLANAR - m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Planar; - m_job.BytesPerRow = width * sizeof(uint16_t); -#else // Interleaved RGB decoding in 16-bits per pixel m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Interleaved; m_job.BytesPerRow = m_channels * width * sizeof(uint16_t); -#endif // PLANAR m_spec = ImageSpec(width, height, m_channels, TypeDesc::UINT16); m_spec.attribute("FramesPerSecond", TypeFloat, &m_fps); @@ -370,50 +364,11 @@ R3dInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/, OIIO_DASSERT(m_next_scanline == 0 && current_subimage() == subimage); } -#ifdef PLANAR - uint16_t *r, *g, *b; - uint16_t* d = (uint16_t*)data; - size_t scanline_size = m_spec.width * sizeof(uint16_t); - size_t plane_size = scanline_size * m_spec.height; - - r = (uint16_t*)((uint8_t*)m_image_buffer + y * scanline_size); - g = (uint16_t*)((uint8_t*)m_image_buffer + y * scanline_size + plane_size); - b = (uint16_t*)((uint8_t*)m_image_buffer + y * scanline_size - + 2 * plane_size); - - for (int x = 0; x < m_spec.width; x++) { - *d++ = r[x]; - *d++ = g[x]; - *d++ = b[x]; - } - - return true; -#elif defined(PLANAR_COPY_IMAGE) - bool result; - - for (int channel = 0; channel < m_spec.nchannels; channel++) { - result = copy_image(1, m_spec.width, 1, m_spec.depth, - m_image_buffer + y * m_spec.width * sizeof(uint16_t) - + channel * m_spec.width * m_spec.height - * sizeof(uint16_t), - sizeof(uint16_t), sizeof(uint16_t), - m_spec.width * sizeof(uint16_t), - m_spec.width * m_spec.height * sizeof(uint16_t), - (void*)((uint16_t*)data + channel), - m_spec.nchannels * sizeof(uint16_t), - m_spec.nchannels * m_spec.width * sizeof(uint16_t), - AutoStride); - if (!result) - return result; - } - return true; -#else return copy_image( m_spec.nchannels, m_spec.width, 1, m_spec.depth, m_image_buffer + y * m_spec.nchannels * m_spec.width * sizeof(uint16_t), m_spec.nchannels * sizeof(uint16_t), AutoStride, AutoStride, AutoStride, data, AutoStride, AutoStride, AutoStride); -#endif // PLANAR } From 89c0bfb47158767abdc3d0e6b3e11fd82b187727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sat, 20 Apr 2024 18:15:09 +0200 Subject: [PATCH 18/27] Allow R3D configuration debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index b54b1d5432..a6caea1a3f 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -58,10 +58,10 @@ OIIO_PLUGIN_NAMESPACE_BEGIN -#if 0 || !defined(NDEBUG) /* allow color configuration debugging */ -static bool colordebug = Strutil::stoi(Sysutil::getenv("OIIO_COLOR_DEBUG")); +#if 0 || !defined(NDEBUG) /* allow R3D configuration debugging */ +static bool r3d_debug = Strutil::stoi(Sysutil::getenv("OIIO_R3D_DEBUG")); # define DBG(...) \ - if (colordebug) \ + if (r3d_debug) \ Strutil::print(__VA_ARGS__) #else # define DBG(...) From 7cf857949b07d31d5e635d8f15e2c0d8d2aa95b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sat, 20 Apr 2024 20:45:20 +0200 Subject: [PATCH 19/27] clang-format again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index a6caea1a3f..59998f3329 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -60,7 +60,7 @@ OIIO_PLUGIN_NAMESPACE_BEGIN #if 0 || !defined(NDEBUG) /* allow R3D configuration debugging */ static bool r3d_debug = Strutil::stoi(Sysutil::getenv("OIIO_R3D_DEBUG")); -# define DBG(...) \ +# define DBG(...) \ if (r3d_debug) \ Strutil::print(__VA_ARGS__) #else From 29f80b128082bf539b95e9a13c6eb8efb3afe849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 7 Feb 2025 16:19:50 +0100 Subject: [PATCH 20/27] R3D SDK 8.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 59998f3329..0ca6e8644e 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -5,9 +5,9 @@ // R3D SDK can be downloaded from the following site: // https://www.red.com/download/r3d-sdk // -// The code has been tested with the version 8.5.1 installed in +// The code has been tested with the version 8.6.0 installed in // /opt/R3DSDKv8_5_1 directory and setting up the variable -// export R3DSDK_ROOT="/opt/R3DSDKv8_5_1" +// export R3DSDK_ROOT="/opt/R3DSDKv8_6_0" #include #include @@ -149,7 +149,7 @@ OIIO_EXPORT const char* r3d_imageio_library_version() { // Note: SDK version can differ from the actual library loaded - return "R3D 8.5.1"; + return "R3D 8.6.0"; } OIIO_EXPORT ImageInput* From 57b570c321a2ef78fc34a9c6c583e46c61f525f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 7 Feb 2025 16:36:04 +0100 Subject: [PATCH 21/27] R3D SDK 8.6.0 location in comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 0ca6e8644e..40333234de 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -6,7 +6,7 @@ // https://www.red.com/download/r3d-sdk // // The code has been tested with the version 8.6.0 installed in -// /opt/R3DSDKv8_5_1 directory and setting up the variable +// /opt/R3DSDKv8_6_0 directory and setting up the variable // export R3DSDK_ROOT="/opt/R3DSDKv8_6_0" #include From 57bc58f6a05dd5ba48caa933783a5960ae9c1908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 7 Feb 2025 21:34:44 +0100 Subject: [PATCH 22/27] R3D SDK 9.0.0 BETA1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 40333234de..14b69ce868 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -5,9 +5,9 @@ // R3D SDK can be downloaded from the following site: // https://www.red.com/download/r3d-sdk // -// The code has been tested with the version 8.6.0 installed in -// /opt/R3DSDKv8_6_0 directory and setting up the variable -// export R3DSDK_ROOT="/opt/R3DSDKv8_6_0" +// The code has been tested with the version 9.0.0 BETA1 installed in +// /opt/R3DSDKv9_0_0-BETA1 directory and setting up the variable +// export R3DSDK_ROOT="/opt/R3DSDKv9_0_0-BETA1" #include #include @@ -149,7 +149,7 @@ OIIO_EXPORT const char* r3d_imageio_library_version() { // Note: SDK version can differ from the actual library loaded - return "R3D 8.6.0"; + return "R3D 9.0.0 BETA1"; } OIIO_EXPORT ImageInput* @@ -172,11 +172,11 @@ R3dInput::initialize() std::string library_path = Sysutil::getenv("OIIO_R3D_LIBRARY_PATH", #if defined(__linux__) - "/opt/R3DSDKv8_5_1/Redistributable/linux" + "/opt/R3DSDKv9_0_0-BETA1/Redistributable/linux" #elif defined(__APPLE__) - "/Library/R3DSDKv8_5_1/Redistributable/mac" + "/Library/R3DSDKv9_0_0-BETA1/Redistributable/mac" #elif defined(__WINDOWS__) - "C:\\R3DSDKv8_5_1\\Redistributable\\win" + "C:\\R3DSDKv9_0_0-BETA1\\Redistributable\\win" #else # error "Unknown OS" #endif From 1031e6d658a17f281fd8bc408cd23f9c773f527c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Wed, 12 Feb 2025 16:01:19 +0100 Subject: [PATCH 23/27] Removed BytesPerRow from struct VideoDecodeJob in new SDK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 14b69ce868..400850e9df 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -280,7 +280,6 @@ R3dInput::open(const std::string& name, ImageSpec& newspec) // Interleaved RGB decoding in 16-bits per pixel m_job.PixelType = R3DSDK::PixelType_16Bit_RGB_Interleaved; - m_job.BytesPerRow = m_channels * width * sizeof(uint16_t); m_spec = ImageSpec(width, height, m_channels, TypeDesc::UINT16); m_spec.attribute("FramesPerSecond", TypeFloat, &m_fps); From 101b47cfa8198d2ab5650ee900f53d8fc965c148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Wed, 12 Feb 2025 18:16:11 +0100 Subject: [PATCH 24/27] Nikon raw files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/iv/imageviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/iv/imageviewer.cpp b/src/iv/imageviewer.cpp index 28df0b2248..c775c2e1d8 100644 --- a/src/iv/imageviewer.cpp +++ b/src/iv/imageviewer.cpp @@ -64,7 +64,7 @@ IsSpecSrgb(const ImageSpec& spec) static const char *s_file_filters = "" "Image Files (*.bmp *.cin *.dcm *.dds *.dpx *.fits *.gif *.hdr *.ico *.iff " "*.jpg *.jpe *.jpeg *.jif *.jfif *.jfi *.jp2 *.j2k *.jxl *.exr *.png *.pbm *.pgm " - "*.ppm *.psd *.ptex *.R3D *.r3d *.rla *.sgi *.rgb *.rgba *.bw *.int *.inta *.pic *.tga " + "*.ppm *.psd *.ptex *.R3D *.r3d *.NEV *.nev *.rla *.sgi *.rgb *.rgba *.bw *.int *.inta *.pic *.tga " "*.tpic *.tif *.tiff *.tx *.env *.sm *.vsm *.vdb *.webp *.zfile);;" "BMP (*.bmp);;" "Cineon (*.cin);;" @@ -79,6 +79,7 @@ static const char *s_file_filters = "" "JPEG (*.jpg *.jpe *.jpeg *.jif *.jfif *.jfi);;" "JPEG-2000 (*.jp2 *.j2k);;" "JPEG XL (*.jxl);;" + "Nikon (*.NEV *.nev);;" "OpenEXR (*.exr);;" "OpenVDB (*.vdb);;" "PhotoShop (*.psd);;" From 03ba0354c579596ebc78f28008256471a047736e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 31 Oct 2025 14:30:41 +0100 Subject: [PATCH 25/27] Update to the R3DSDK 9.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/iv/imageviewer.cpp | 6 +- src/python/stubs/OpenImageIO/__init__.pyi | 1629 --------------------- src/r3d.imageio/r3dinput.cpp | 16 +- 3 files changed, 11 insertions(+), 1640 deletions(-) delete mode 100644 src/python/stubs/OpenImageIO/__init__.pyi diff --git a/src/iv/imageviewer.cpp b/src/iv/imageviewer.cpp index 5e9f49c58c..0e996976aa 100644 --- a/src/iv/imageviewer.cpp +++ b/src/iv/imageviewer.cpp @@ -64,7 +64,7 @@ IsSpecSrgb(const ImageSpec& spec) static const char *s_file_filters = "" "Image Files (*.bmp *.cin *.dcm *.dds *.dpx *.fits *.gif *.hdr *.ico *.iff " "*.jpg *.jpe *.jpeg *.jif *.jfif *.jfi *.jp2 *.j2k *.jxl *.exr *.png *.pbm *.pgm " - "*.ppm *.psd *.ptex *.R3D *.r3d *.NEV *.nev *.rla *.sgi *.rgb *.rgba *.bw *.int *.inta *.pic *.tga " + "*.ppm *.psd *.ptex *.r3d *.nev *.rla *.sgi *.rgb *.rgba *.bw *.int *.inta *.pic *.tga " "*.tpic *.tif *.tiff *.tx *.env *.sm *.vsm *.vdb *.webp *.zfile);;" "BMP (*.bmp);;" "Cineon (*.cin);;" @@ -79,14 +79,14 @@ static const char *s_file_filters = "" "JPEG (*.jpg *.jpe *.jpeg *.jif *.jfif *.jfi);;" "JPEG-2000 (*.jp2 *.j2k);;" "JPEG XL (*.jxl);;" - "Nikon (*.NEV *.nev);;" + "Nikon (*.nev);;" "OpenEXR (*.exr);;" "OpenVDB (*.vdb);;" "PhotoShop (*.psd);;" "Portable Network Graphics (*.png);;" "PNM / Netpbm (*.pbm *.pgm *.ppm);;" "Ptex (*.ptex);;" - "R3D (*.R3D *.r3d);;" + "R3D (*.r3d);;" "RLA (*.rla);;" "SGI (*.sgi *.rgb *.rgba *.bw *.int *.inta);;" "Softimage PIC (*.pic);;" diff --git a/src/python/stubs/OpenImageIO/__init__.pyi b/src/python/stubs/OpenImageIO/__init__.pyi deleted file mode 100644 index 200be7d774..0000000000 --- a/src/python/stubs/OpenImageIO/__init__.pyi +++ /dev/null @@ -1,1629 +0,0 @@ -# -# This file is auto-generated. DO NOT MODIFY! Run `make pystubs` to regenerate -# - -import collections.abc -import numpy -import typing -import typing_extensions -from _typeshed import Incomplete -from typing import ClassVar, overload - -AutoStride: int -BOX: VECSEMANTICS -CHAR: BASETYPE -COLOR: VECSEMANTICS -DOUBLE: BASETYPE -FLOAT: BASETYPE -HALF: BASETYPE -INT: BASETYPE -INT16: BASETYPE -INT32: BASETYPE -INT64: BASETYPE -INT8: BASETYPE -INTRO_STRING: str -KEYCODE: VECSEMANTICS -LASTBASE: BASETYPE -LONGLONG: BASETYPE -MATRIX33: AGGREGATE -MATRIX44: AGGREGATE -MakeTxBumpWithSlopes: MakeTextureMode -MakeTxEnvLatl: MakeTextureMode -MakeTxEnvLatlFromLightProbe: MakeTextureMode -MakeTxShadow: MakeTextureMode -MakeTxTexture: MakeTextureMode -NONE: BASETYPE -NONFINITE_BLACK: NonFiniteFixMode -NONFINITE_BOX3: NonFiniteFixMode -NONFINITE_NONE: NonFiniteFixMode -NORMAL: VECSEMANTICS -NOSEMANTICS: VECSEMANTICS -NOXFORM: VECSEMANTICS -OpenColorIO_version_hex: int -POINT: VECSEMANTICS -PTR: BASETYPE -RATIONAL: VECSEMANTICS -SCALAR: AGGREGATE -SHORT: BASETYPE -STRING: BASETYPE -TIMECODE: VECSEMANTICS -TypeBox2: TypeDesc -TypeBox2i: TypeDesc -TypeBox3: TypeDesc -TypeBox3i: TypeDesc -TypeColor: TypeDesc -TypeFloat: TypeDesc -TypeFloat2: TypeDesc -TypeFloat4: TypeDesc -TypeHalf: TypeDesc -TypeInt: TypeDesc -TypeInt16: TypeDesc -TypeInt32: TypeDesc -TypeInt64: TypeDesc -TypeInt8: TypeDesc -TypeKeyCode: TypeDesc -TypeMatrix: TypeDesc -TypeMatrix33: TypeDesc -TypeMatrix44: TypeDesc -TypeNormal: TypeDesc -TypePoint: TypeDesc -TypePointer: TypeDesc -TypeRational: TypeDesc -TypeString: TypeDesc -TypeTimeCode: TypeDesc -TypeUInt: TypeDesc -TypeUInt16: TypeDesc -TypeUInt32: TypeDesc -TypeUInt64: TypeDesc -TypeUInt8: TypeDesc -TypeUnknown: TypeDesc -TypeVector: TypeDesc -TypeVector2: TypeDesc -TypeVector2i: TypeDesc -TypeVector3i: TypeDesc -TypeVector4: TypeDesc -UCHAR: BASETYPE -UINT: BASETYPE -UINT16: BASETYPE -UINT32: BASETYPE -UINT64: BASETYPE -UINT8: BASETYPE -ULONGLONG: BASETYPE -UNKNOWN: BASETYPE -USHORT: BASETYPE -VEC2: AGGREGATE -VEC3: AGGREGATE -VEC4: AGGREGATE -VECTOR: VECSEMANTICS -VERSION: int -VERSION_MAJOR: int -VERSION_MINOR: int -VERSION_PATCH: int -VERSION_STRING: str -__version__: str -openimageio_version: int -supportsOpenColorIO: bool - -class AGGREGATE: - __members__: ClassVar[dict] = ... # read-only - MATRIX33: ClassVar[AGGREGATE] = ... - MATRIX44: ClassVar[AGGREGATE] = ... - SCALAR: ClassVar[AGGREGATE] = ... - VEC2: ClassVar[AGGREGATE] = ... - VEC3: ClassVar[AGGREGATE] = ... - VEC4: ClassVar[AGGREGATE] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class BASETYPE: - __members__: ClassVar[dict] = ... # read-only - CHAR: ClassVar[BASETYPE] = ... - DOUBLE: ClassVar[BASETYPE] = ... - FLOAT: ClassVar[BASETYPE] = ... - HALF: ClassVar[BASETYPE] = ... - INT: ClassVar[BASETYPE] = ... - INT16: ClassVar[BASETYPE] = ... - INT32: ClassVar[BASETYPE] = ... - INT64: ClassVar[BASETYPE] = ... - INT8: ClassVar[BASETYPE] = ... - LASTBASE: ClassVar[BASETYPE] = ... - LONGLONG: ClassVar[BASETYPE] = ... - NONE: ClassVar[BASETYPE] = ... - PTR: ClassVar[BASETYPE] = ... - SHORT: ClassVar[BASETYPE] = ... - STRING: ClassVar[BASETYPE] = ... - UCHAR: ClassVar[BASETYPE] = ... - UINT: ClassVar[BASETYPE] = ... - UINT16: ClassVar[BASETYPE] = ... - UINT32: ClassVar[BASETYPE] = ... - UINT64: ClassVar[BASETYPE] = ... - UINT8: ClassVar[BASETYPE] = ... - ULONGLONG: ClassVar[BASETYPE] = ... - UNKNOWN: ClassVar[BASETYPE] = ... - USHORT: ClassVar[BASETYPE] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class ColorConfig: - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, arg0: str, /) -> None: ... - def configname(self) -> str: ... - @staticmethod - def default_colorconfig() -> ColorConfig: ... - def equivalent(self, color_space: str, other_color_space: str) -> bool: ... - def filepathOnlyMatchesDefaultRule(self, filepath: str) -> bool: ... - def getAliases(self, arg0: str, /) -> list[str]: ... - def getColorSpaceDataType(self, name: str) -> tuple[TypeDesc, int]: ... - def getColorSpaceFamilyByName(self, name: str) -> str: ... - @overload - def getColorSpaceFromFilepath(self, filepath: str) -> str: ... - @overload - def getColorSpaceFromFilepath(self, filepath: str, default_cs: str, cs_name_match: bool = ...) -> str: ... - def getColorSpaceIndex(self, name: str) -> int: ... - def getColorSpaceNameByIndex(self, arg0: typing.SupportsInt, /) -> str: ... - def getColorSpaceNameByRole(self, role: str) -> str: ... - def getColorSpaceNames(self) -> list[str]: ... - def getDefaultDisplayName(self) -> str: ... - @overload - def getDefaultViewName(self, display: str = ...) -> str: ... - @overload - def getDefaultViewName(self, display: str = ..., *, input_color_space: str) -> str: ... - def getDisplayNameByIndex(self, arg0: typing.SupportsInt, /) -> str: ... - def getDisplayNames(self) -> list[str]: ... - def getDisplayViewColorSpaceName(self, display: str, view: str) -> str: ... - def getDisplayViewLooks(self, display: str, view: str) -> str: ... - def getLookNameByIndex(self, arg0: typing.SupportsInt, /) -> str: ... - def getLookNames(self) -> list[str]: ... - def getNamedTransformAliases(self, arg0: str, /) -> list[str]: ... - def getNamedTransformNameByIndex(self, arg0: typing.SupportsInt, /) -> str: ... - def getNamedTransformNames(self) -> list[str]: ... - def getNumColorSpaces(self) -> int: ... - def getNumDisplays(self) -> int: ... - def getNumLooks(self) -> int: ... - def getNumNamedTransforms(self) -> int: ... - def getNumRoles(self) -> int: ... - def getNumViews(self, display: str = ...) -> int: ... - def getRoleByIndex(self, arg0: typing.SupportsInt, /) -> str: ... - def getRoles(self) -> list[str]: ... - def getViewNameByIndex(self, display: str = ..., *, index: typing.SupportsInt) -> str: ... - def getViewNames(self, display: str = ...) -> list[str]: ... - def geterror(self) -> str: ... - def parseColorSpaceFromString(self, arg0: str, /) -> str: ... - def resolve(self, name: str) -> str: ... - -class CompareResults: - def __init__(self) -> None: ... - @property - def PSNR(self) -> float: ... - @property - def error(self) -> bool: ... - @property - def maxc(self) -> int: ... - @property - def maxerror(self) -> float: ... - @property - def maxx(self) -> int: ... - @property - def maxy(self) -> int: ... - @property - def maxz(self) -> int: ... - @property - def meanerror(self) -> float: ... - @property - def nfail(self) -> int: ... - @property - def nwarn(self) -> int: ... - @property - def rms_error(self) -> float: ... - -class DeepData: - def __init__(self) -> None: ... - def allocated(self) -> bool: ... - def capacity(self, pixel: typing.SupportsInt) -> int: ... - def channelname(self, arg0: typing.SupportsInt, /) -> str: ... - def channelsize(self, arg0: typing.SupportsInt, /) -> int: ... - def channeltype(self, arg0: typing.SupportsInt, /) -> TypeDesc: ... - def clear(self) -> None: ... - def copy_deep_pixel(self, pixel: typing.SupportsInt, src: DeepData, srcpixel: typing.SupportsInt) -> bool: ... - def copy_deep_sample(self, pixel: typing.SupportsInt, sample: typing.SupportsInt, src: DeepData, srcpixel: typing.SupportsInt, srcsample: typing.SupportsInt) -> bool: ... - def deep_value(self, pixel: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt) -> float: ... - def deep_value_uint(self, pixel: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt) -> int: ... - def erase_samples(self, pixel: typing.SupportsInt, samplepos: typing.SupportsInt, nsamples: typing.SupportsInt = ...) -> None: ... - def free(self) -> None: ... - @overload - def init(self, npixels: typing.SupportsInt, nchannels: typing.SupportsInt, channeltypes: object, channelnames: object) -> None: ... - @overload - def init(self, arg0: ImageSpec, /) -> None: ... - def initialized(self) -> bool: ... - def insert_samples(self, pixel: typing.SupportsInt, samplepos: typing.SupportsInt, nsamples: typing.SupportsInt = ...) -> None: ... - def merge_deep_pixels(self, pixel: typing.SupportsInt, src: DeepData, srcpixel: typing.SupportsInt) -> None: ... - def merge_overlaps(self, pixel: typing.SupportsInt) -> None: ... - def occlusion_cull(self, pixel: typing.SupportsInt) -> None: ... - def opaque_z(self, pixel: typing.SupportsInt) -> float: ... - def same_channeltypes(self, arg0: DeepData, /) -> bool: ... - def samples(self, pixel: typing.SupportsInt) -> int: ... - def samplesize(self) -> int: ... - def set_capacity(self, pixel: typing.SupportsInt, nsamples: typing.SupportsInt) -> None: ... - def set_deep_value(self, pixel: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt, value: typing.SupportsFloat) -> None: ... - def set_deep_value_uint(self, pixel: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt, value: typing.SupportsInt) -> None: ... - def set_samples(self, pixel: typing.SupportsInt, nsamples: typing.SupportsInt) -> None: ... - def sort(self, pixel: typing.SupportsInt) -> None: ... - def split(self, pixel: typing.SupportsInt, depth: typing.SupportsFloat) -> bool: ... - @property - def AB_channel(self) -> int: ... - @property - def AG_channel(self) -> int: ... - @property - def AR_channel(self) -> int: ... - @property - def A_channel(self) -> int: ... - @property - def Z_channel(self) -> int: ... - @property - def Zback_channel(self) -> int: ... - @property - def channels(self) -> int: ... - @property - def pixels(self) -> int: ... - -class ImageBuf: - orientation: int - roi_full: ROI - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, arg0: str, /) -> None: ... - @overload - def __init__(self, arg0: str, arg1: typing.SupportsInt, arg2: typing.SupportsInt, /) -> None: ... - @overload - def __init__(self, arg0: ImageSpec, /) -> None: ... - @overload - def __init__(self, arg0: ImageSpec, arg1: bool, /) -> None: ... - @overload - def __init__(self, name: str, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, config: ImageSpec) -> None: ... - @overload - def __init__(self, buffer: typing_extensions.Buffer) -> None: ... - def clear(self) -> None: ... - def clear_thumbnail(self) -> None: ... - @overload - def copy(self, src: ImageBuf, format: TypeDesc | BASETYPE | str = ...) -> bool: ... - @overload - def copy(self, format: TypeDesc | BASETYPE | str = ...) -> ImageBuf: ... - def copy_metadata(self, arg0: ImageBuf, /) -> None: ... - def copy_pixels(self, arg0: ImageBuf, /) -> bool: ... - def deep_erase_samples(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ..., *, samplepos: typing.SupportsInt, nsamples: typing.SupportsInt = ...) -> None: ... - def deep_insert_samples(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ..., *, samplepos: typing.SupportsInt, nsamples: typing.SupportsInt = ...) -> None: ... - def deep_samples(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ...) -> int: ... - def deep_value(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt) -> float: ... - def deep_value_uint(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt) -> int: ... - def deepdata(self) -> DeepData: ... - def get_pixels(self, format: TypeDesc | BASETYPE | str = ..., roi: ROI = ...) -> numpy.ndarray | None: ... - def get_thumbnail(self) -> ImageBuf: ... - def getchannel(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, c: typing.SupportsInt, wrap=...) -> float: ... - def geterror(self, clear: bool = ...) -> str: ... - def getpixel(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ..., wrap: str = ...) -> tuple[float, ...]: ... - def init_spec(self, filename: str, subimage: typing.SupportsInt = ..., miplevel: typing.SupportsInt = ...) -> bool: ... - def interppixel(self, x: typing.SupportsFloat, y: typing.SupportsFloat, wrap: str = ...) -> tuple[float, ...]: ... - def interppixel_NDC(self, x: typing.SupportsFloat, y: typing.SupportsFloat, wrap: str = ...) -> tuple[float, ...]: ... - def interppixel_NDC_full(self, x: typing.SupportsFloat, y: typing.SupportsFloat, wrap: str = ...) -> tuple[float, ...]: ... - def interppixel_bicubic(self, x: typing.SupportsFloat, y: typing.SupportsFloat, wrap: str = ...) -> tuple[float, ...]: ... - def interppixel_bicubic_NDC(self, x: typing.SupportsFloat, y: typing.SupportsFloat, wrap: str = ...) -> tuple[float, ...]: ... - def make_writable(self, keep_cache_type: bool = ...) -> bool: ... - def merge_metadata(self, src: ImageBuf, override: bool = ..., pattern: str = ...) -> None: ... - def nativespec(self) -> ImageSpec: ... - def pixelindex(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, check_range: bool = ...) -> int: ... - @overload - def read(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt, force: bool, convert: TypeDesc | BASETYPE | str) -> bool: ... - @overload - def read(self, subimage: typing.SupportsInt = ..., miplevel: typing.SupportsInt = ..., force: bool = ..., convert: TypeDesc | BASETYPE | str = ...) -> bool: ... - @overload - def reset(self, name: str, subimage: typing.SupportsInt = ..., miplevel: typing.SupportsInt = ...) -> None: ... - @overload - def reset(self, name: str, subimage: typing.SupportsInt = ..., miplevel: typing.SupportsInt = ..., config: ImageSpec = ...) -> None: ... - @overload - def reset(self, spec: ImageSpec, zero: bool = ...) -> None: ... - @overload - def reset(self, buffer: typing_extensions.Buffer) -> None: ... - def set_deep_samples(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ..., nsamples: typing.SupportsInt = ...) -> None: ... - def set_deep_value(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt, value: typing.SupportsFloat = ...) -> None: ... - def set_deep_value_uint(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, channel: typing.SupportsInt, sample: typing.SupportsInt, value: typing.SupportsInt = ...) -> None: ... - def set_full(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, arg2: typing.SupportsInt, arg3: typing.SupportsInt, arg4: typing.SupportsInt, arg5: typing.SupportsInt, /) -> None: ... - def set_origin(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ...) -> None: ... - def set_pixels(self, roi: ROI, pixels: typing_extensions.Buffer) -> bool: ... - def set_thumbnail(self, thumb: ImageBuf) -> None: ... - def set_write_format(self, arg0: object, /) -> None: ... - def set_write_tiles(self, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., depth: typing.SupportsInt = ...) -> None: ... - @overload - def setpixel(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, pixel: object) -> None: ... - @overload - def setpixel(self, x: typing.SupportsInt, y: typing.SupportsInt, pixel: object) -> None: ... - @overload - def setpixel(self, i: typing.SupportsInt, pixel: object) -> None: ... - def spec(self) -> ImageSpec: ... - def specmod(self) -> ImageSpec: ... - def swap(self, arg0: ImageBuf, /) -> None: ... - @overload - def write(self, filename: str, dtype: TypeDesc | BASETYPE | str = ..., fileformat: str = ...) -> bool: ... - @overload - def write(self, out: ImageOutput) -> bool: ... - @property - def deep(self) -> bool: ... - @property - def file_format_name(self) -> str: ... - @property - def has_error(self) -> bool: ... - @property - def has_thumbnail(self) -> bool: ... - @property - def initialized(self) -> bool: ... - @property - def miplevel(self) -> int: ... - @property - def name(self) -> str: ... - @property - def nchannels(self) -> int: ... - @property - def nmiplevels(self) -> int: ... - @property - def nsubimages(self) -> int: ... - @property - def oriented_full_height(self) -> int: ... - @property - def oriented_full_width(self) -> int: ... - @property - def oriented_full_x(self) -> int: ... - @property - def oriented_full_y(self) -> int: ... - @property - def oriented_height(self) -> int: ... - @property - def oriented_width(self) -> int: ... - @property - def oriented_x(self) -> int: ... - @property - def oriented_y(self) -> int: ... - @property - def pixels_valid(self) -> bool: ... - @property - def pixeltype(self) -> TypeDesc: ... - @property - def roi(self) -> ROI: ... - @property - def subimage(self) -> int: ... - @property - def xbegin(self) -> int: ... - @property - def xend(self) -> int: ... - @property - def xmax(self) -> int: ... - @property - def xmin(self) -> int: ... - @property - def ybegin(self) -> int: ... - @property - def yend(self) -> int: ... - @property - def ymax(self) -> int: ... - @property - def ymin(self) -> int: ... - @property - def zbegin(self) -> int: ... - @property - def zend(self) -> int: ... - @property - def zmax(self) -> int: ... - @property - def zmin(self) -> int: ... - -class ImageBufAlgo: - def __init__(self, *args, **kwargs) -> None: ... - @overload - @staticmethod - def abs(dst: ImageBuf, A: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def abs(A: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def absdiff(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def absdiff(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def absdiff(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def absdiff(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def add(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def add(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def add(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def add(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def bluenoise_image() -> ImageBuf: ... - @overload - @staticmethod - def channel_append(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def channel_append(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def channel_sum(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def channel_sum(dst: ImageBuf, src: ImageBuf, weight: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def channel_sum(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def channel_sum(src: ImageBuf, weight: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def channels(dst: ImageBuf, src: ImageBuf, channelorder: tuple, newchannelnames: tuple = ..., shuffle_channel_names: bool = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def channels(src: ImageBuf, channelorder: tuple, newchannelnames: tuple = ..., shuffle_channel_names: bool = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def checker(dst: ImageBuf, width: typing.SupportsInt, height: typing.SupportsInt, depth: typing.SupportsInt, color1: object, color2: object, xoffset: typing.SupportsInt = ..., yoffset: typing.SupportsInt = ..., zoffset: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def checker(width: typing.SupportsInt, height: typing.SupportsInt, depth: typing.SupportsInt, color1: object, color2: object, xoffset: typing.SupportsInt = ..., yoffset: typing.SupportsInt = ..., zoffset: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def circular_shift(dst: ImageBuf, src: ImageBuf, xshift: typing.SupportsInt, yshift: typing.SupportsInt, zshift: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def circular_shift(src: ImageBuf, xshift: typing.SupportsInt, yshift: typing.SupportsInt, zshift: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def clamp(dst: ImageBuf, src: ImageBuf, min: float | typing.Iterable[float], max: float | typing.Iterable[float], clampalpha01: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def clamp(src: ImageBuf, min: float | typing.Iterable[float], max: float | typing.Iterable[float], clampalpha01: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def color_map(dst: ImageBuf, src: ImageBuf, srcchannel: typing.SupportsInt, mapname: str, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def color_map(dst: ImageBuf, src: ImageBuf, srcchannel: typing.SupportsInt, nknots: typing.SupportsInt, channels: typing.SupportsInt, knots: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def color_map(src: ImageBuf, srcchannel: typing.SupportsInt, mapname: str, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def color_map(src: ImageBuf, srcchannel: typing.SupportsInt, nknots: typing.SupportsInt, channels: typing.SupportsInt, knots: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def color_range_check(src: ImageBuf, low: object, high: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> tuple[int, ...] | None: ... - @overload - @staticmethod - def colorconvert(dst: ImageBuf, src: ImageBuf, fromspace: str, tospace: str, unpremult: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def colorconvert(dst: ImageBuf, src: ImageBuf, fromspace: str, tospace: str, unpremult: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def colorconvert(src: ImageBuf, fromspace: str, tospace: str, unpremult: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def colorconvert(src: ImageBuf, fromspace: str, tospace: str, unpremult: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def colormatrixtransform(dst: ImageBuf, src: ImageBuf, M: object, unpremult: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def colormatrixtransform(src: ImageBuf, M: object, unpremult: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def compare(A: ImageBuf, B: ImageBuf, failthresh: typing.SupportsFloat, warnthresh: typing.SupportsFloat, result: CompareResults, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def compare(A: ImageBuf, B: ImageBuf, failthresh: typing.SupportsFloat, warnthresh: typing.SupportsFloat, failrelative: typing.SupportsFloat = ..., warnrelative: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> CompareResults: ... - @overload - @staticmethod - def compare(A: ImageBuf, B: ImageBuf, failthresh: typing.SupportsFloat, warnthresh: typing.SupportsFloat, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> CompareResults: ... - @staticmethod - def compare_Yee(A: ImageBuf, B: ImageBuf, result: CompareResults, luminance: typing.SupportsFloat = ..., fov: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def complex_to_polar(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def complex_to_polar(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def computePixelHashSHA1(src: ImageBuf, extrainfo: str = ..., roi: ROI = ..., blocksize: typing.SupportsInt = ..., nthreads: typing.SupportsInt = ...) -> str: ... - @overload - @staticmethod - def computePixelStats(src: ImageBuf, stats: PixelStats, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def computePixelStats(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> PixelStats: ... - @overload - @staticmethod - def contrast_remap(dst: ImageBuf, src: ImageBuf, black: float | typing.Iterable[float] = ..., white: float | typing.Iterable[float] = ..., min: float | typing.Iterable[float] = ..., max: float | typing.Iterable[float] = ..., scontrast: float | typing.Iterable[float] = ..., sthresh: float | typing.Iterable[float] = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def contrast_remap(src: ImageBuf, black: float | typing.Iterable[float] = ..., white: float | typing.Iterable[float] = ..., min: float | typing.Iterable[float] = ..., max: float | typing.Iterable[float] = ..., scontrast: float | typing.Iterable[float] = ..., sthresh: float | typing.Iterable[float] = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def convolve(dst: ImageBuf, src: ImageBuf, kernel: ImageBuf, normalze: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def convolve(src: ImageBuf, kernel: ImageBuf, normalze: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def copy(dst: ImageBuf, src: ImageBuf, convert: TypeDesc | BASETYPE | str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def copy(src: ImageBuf, convert: TypeDesc | BASETYPE | str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def crop(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def crop(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def cut(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def cut(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def deep_holdout(dst: ImageBuf, src: ImageBuf, holdout: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def deep_holdout(src: ImageBuf, holdout: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def deep_merge(dst: ImageBuf, A: ImageBuf, B: ImageBuf, occlusion_cull: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def deep_merge(A: ImageBuf, B: ImageBuf, occlusion_cull: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def deepen(dst: ImageBuf, src: ImageBuf, zvalue: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def deepen(src: ImageBuf, zvalue: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def demosaic(dst: ImageBuf, src: ImageBuf, pattern: str = ..., algorithm: str = ..., layout: str = ..., white_balance_mode: str = ..., white_balance: float | typing.Iterable[float] = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def demosaic(src: ImageBuf, pattern: str = ..., algorithm: str = ..., layout: str = ..., white_balance_mode: str = ..., white_balance: float | typing.Iterable[float] = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def dilate(dst: ImageBuf, src: ImageBuf, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def dilate(src: ImageBuf, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def div(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def div(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def div(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def div(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def erode(dst: ImageBuf, src: ImageBuf, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def erode(src: ImageBuf, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fft(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fft(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fill(dst: ImageBuf, values: float | typing.Iterable[float], roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fill(dst: ImageBuf, top: float | typing.Iterable[float], bottom: float | typing.Iterable[float], roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fill(dst: ImageBuf, topleft: float | typing.Iterable[float], topright: float | typing.Iterable[float], bottomleft: float | typing.Iterable[float], bottomright: float | typing.Iterable[float], roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fill(values: float | typing.Iterable[float], roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fill(top: float | typing.Iterable[float], bottom: float | typing.Iterable[float], roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fill(topleft: float | typing.Iterable[float], topright: float | typing.Iterable[float], bottomleft: float | typing.Iterable[float], bottomright: float | typing.Iterable[float], roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fillholes_pushpull(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fillholes_pushpull(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fit(dst: ImageBuf, src: ImageBuf, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., fillmode: str = ..., exact: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fit(src: ImageBuf, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., fillmode: str = ..., exact: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def fixNonFinite(dst: ImageBuf, src: ImageBuf, mode: NonFiniteFixMode = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def fixNonFinite(src: ImageBuf, mode: NonFiniteFixMode = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def flatten(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def flatten(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def flip(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def flip(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def flop(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def flop(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def histogram(src: ImageBuf, channel: typing.SupportsInt = ..., bins: typing.SupportsInt = ..., min: typing.SupportsFloat = ..., max: typing.SupportsFloat = ..., ignore_empty: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> tuple[int, ...]: ... - @overload - @staticmethod - def ifft(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ifft(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def invert(dst: ImageBuf, A: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def invert(A: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def isConstantChannel(src: ImageBuf, channel: typing.SupportsInt, val: typing.SupportsFloat, threshold: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @staticmethod - def isConstantColor(src: ImageBuf, threshold: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> tuple[float, ...] | None: ... - @staticmethod - def isMonochrome(src: ImageBuf, threshold: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def laplacian(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def laplacian(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def mad(dst: ImageBuf, A: ImageBuf, B: ImageBuf, C: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def mad(dst: ImageBuf, A: ImageBuf, B: object, C: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def mad(dst: ImageBuf, A: object, B: ImageBuf, C: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def mad(dst: ImageBuf, A: ImageBuf, B: object, C: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def mad(A: ImageBuf, B: ImageBuf, C: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def mad(A: ImageBuf, B: object, C: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def mad(A: object, B: ImageBuf, C: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def mad(A: ImageBuf, B: object, C: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def make_kernel(dst: ImageBuf, name: str, width: typing.SupportsFloat, height: typing.SupportsFloat, depth: typing.SupportsFloat = ..., normalize: bool = ...) -> bool: ... - @overload - @staticmethod - def make_kernel(name: str, width: typing.SupportsFloat, height: typing.SupportsFloat, depth: typing.SupportsFloat = ..., normalize: bool = ...) -> ImageBuf: ... - @overload - @staticmethod - def make_texture(mode: MakeTextureMode, filename: str, outputfilename: str, config: ImageSpec = ...) -> bool: ... - @overload - @staticmethod - def make_texture(mode: MakeTextureMode, buf: ImageBuf, outputfilename: str, config: ImageSpec = ...) -> bool: ... - @overload - @staticmethod - def max(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def max(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def max(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def max(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def maxchan(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def maxchan(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def median_filter(dst: ImageBuf, src: ImageBuf, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def median_filter(src: ImageBuf, width: typing.SupportsInt = ..., height: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def min(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def min(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def min(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def min(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def minchan(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def minchan(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def mul(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def mul(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def mul(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def mul(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def noise(dst: ImageBuf, type: str = ..., A: typing.SupportsFloat = ..., B: typing.SupportsFloat = ..., mono: bool = ..., seed: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def noise(type: str = ..., A: typing.SupportsFloat = ..., B: typing.SupportsFloat = ..., mono: bool = ..., seed: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def nonzero_region(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ROI: ... - @overload - @staticmethod - def normalize(dst: ImageBuf, src: ImageBuf, inCenter: typing.SupportsFloat = ..., outCenter: typing.SupportsFloat = ..., scale: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def normalize(src: ImageBuf, inCenter: typing.SupportsFloat = ..., outCenter: typing.SupportsFloat = ..., scale: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociodisplay(dst: ImageBuf, src: ImageBuf, display: str, view: str, fromspace: str = ..., looks: str = ..., unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociodisplay(dst: ImageBuf, src: ImageBuf, display: str, view: str, fromspace: str = ..., looks: str = ..., unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociodisplay(src: ImageBuf, display: str, view: str, fromspace: str = ..., looks: str = ..., unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociodisplay(src: ImageBuf, display: str, view: str, fromspace: str = ..., looks: str = ..., unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociodisplay(dst: ImageBuf, src: ImageBuf, display: str, view: str, fromspace: str, looks: str, unpremult: bool, context_key: str, context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociodisplay(dst: ImageBuf, src: ImageBuf, display: str, view: str, fromspace: str, looks: str, unpremult: bool, context_key: str, context_value: str, colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociodisplay(src: ImageBuf, display: str, view: str, fromspace: str, looks: str, unpremult: bool, context_key: str, context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociodisplay(src: ImageBuf, display: str, view: str, fromspace: str, looks: str, unpremult: bool, context_key: str, context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociofiletransform(dst: ImageBuf, src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociofiletransform(dst: ImageBuf, src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociofiletransform(src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociofiletransform(src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociolook(dst: ImageBuf, src: ImageBuf, looks: str, fromspace: str, tospace: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociolook(dst: ImageBuf, src: ImageBuf, looks: str, fromspace: str, tospace: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ociolook(src: ImageBuf, looks: str, fromspace: str, tospace: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ociolook(src: ImageBuf, looks: str, fromspace: str, tospace: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ocionamedtransform(dst: ImageBuf, src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ocionamedtransform(dst: ImageBuf, src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def ocionamedtransform(src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def ocionamedtransform(src: ImageBuf, name: str, unpremult: bool = ..., inverse: bool = ..., context_key: str = ..., context_value: str = ..., colorconfig: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def over(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def over(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def paste(dst: ImageBuf, xbegin: typing.SupportsInt, ybegin: typing.SupportsInt, zbegin: typing.SupportsInt, chbegin: typing.SupportsInt, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def polar_to_complex(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def polar_to_complex(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def pow(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def pow(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def premult(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def premult(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rangecompress(dst: ImageBuf, src: ImageBuf, useluma: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rangecompress(src: ImageBuf, useluma: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rangeexpand(dst: ImageBuf, src: ImageBuf, useluma: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rangeexpand(src: ImageBuf, useluma: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def render_box(dst: ImageBuf, x1: typing.SupportsInt, y1: typing.SupportsInt, x2: typing.SupportsInt, y2: typing.SupportsInt, color: float | typing.Iterable[float] = ..., fill: bool = ...) -> bool: ... - @staticmethod - def render_line(dst: ImageBuf, x1: typing.SupportsInt, y1: typing.SupportsInt, x2: typing.SupportsInt, y2: typing.SupportsInt, color: float | typing.Iterable[float] = ..., skip_first_point: bool = ...) -> bool: ... - @staticmethod - def render_point(dst: ImageBuf, x: typing.SupportsInt, y: typing.SupportsInt, color: float | typing.Iterable[float] = ...) -> bool: ... - @staticmethod - def render_text(dst: ImageBuf, x: typing.SupportsInt, y: typing.SupportsInt, text: str, fontsize: typing.SupportsInt = ..., fontname: str = ..., textcolor: object = ..., alignx: str = ..., aligny: str = ..., shadow: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def reorient(dst: ImageBuf, src: ImageBuf, nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def reorient(src: ImageBuf, nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def repremult(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def repremult(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def resample(dst: ImageBuf, src: ImageBuf, interpolate: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def resample(src: ImageBuf, interpolate: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def resize(dst: ImageBuf, src: ImageBuf, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def resize(src: ImageBuf, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rotate(dst: ImageBuf, src: ImageBuf, angle: typing.SupportsFloat, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., recompute_roi: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rotate(dst: ImageBuf, src: ImageBuf, angle: typing.SupportsFloat, center_x: typing.SupportsFloat, center_y: typing.SupportsFloat, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., recompute_roi: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rotate(src: ImageBuf, angle: typing.SupportsFloat, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., recompute_roi: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rotate(src: ImageBuf, angle: typing.SupportsFloat, center_x: typing.SupportsFloat, center_y: typing.SupportsFloat, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., recompute_roi: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rotate180(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rotate180(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rotate270(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rotate270(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def rotate90(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def rotate90(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def saturate(dst: ImageBuf, src: ImageBuf, scale: typing.SupportsFloat = ..., firstchannel: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def saturate(src: ImageBuf, scale: typing.SupportsFloat = ..., firstchannel: typing.SupportsInt = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def scale(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def scale(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def st_warp(dst: ImageBuf, src: ImageBuf, stbuf: ImageBuf, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., chan_s: typing.SupportsInt = ..., chan_t: typing.SupportsInt = ..., flip_s: bool = ..., flip_t: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def st_warp(src: ImageBuf, stbuf: ImageBuf, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., chan_s: typing.SupportsInt = ..., chan_t: typing.SupportsInt = ..., flip_s: bool = ..., flip_t: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def sub(dst: ImageBuf, A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def sub(dst: ImageBuf, A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def sub(A: ImageBuf, B: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def sub(A: ImageBuf, B: object, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @staticmethod - def text_size(text: str, fontsize: typing.SupportsInt = ..., fontname: str = ...) -> ROI: ... - @overload - @staticmethod - def transpose(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def transpose(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def unpremult(dst: ImageBuf, src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def unpremult(src: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def unsharp_mask(dst: ImageBuf, src: ImageBuf, kernel: str = ..., width: typing.SupportsFloat = ..., contrast: typing.SupportsFloat = ..., threshold: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def unsharp_mask(src: ImageBuf, kernel: str = ..., width: typing.SupportsFloat = ..., contrast: typing.SupportsFloat = ..., threshold: typing.SupportsFloat = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def warp(dst: ImageBuf, src: ImageBuf, M: object, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., recompute_roi: bool = ..., wrap: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def warp(src: ImageBuf, M: object, filtername: str = ..., filterwidth: typing.SupportsFloat = ..., recompute_roi: bool = ..., wrap: str = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def zero(dst: ImageBuf, roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def zero(roi: ROI, nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - @overload - @staticmethod - def zover(dst: ImageBuf, A: ImageBuf, B: ImageBuf, z_zeroisinf: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> bool: ... - @overload - @staticmethod - def zover(A: ImageBuf, B: ImageBuf, z_zeroisinf: bool = ..., roi: ROI = ..., nthreads: typing.SupportsInt = ...) -> ImageBuf: ... - -class ImageCache: - def __init__(self, shared: bool = ...) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsFloat, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsInt, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: str, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: TypeDesc | BASETYPE | str, arg2: object, /) -> None: ... - @staticmethod - def destroy(cache: ImageCache, teardown: bool = ...) -> None: ... - def get_cache_dimensions(self, filename: str, subimage: typing.SupportsInt = ..., miplevel: typing.SupportsInt = ...) -> ImageSpec: ... - def get_imagespec(self, filename: str, subimage: typing.SupportsInt = ...) -> ImageSpec: ... - @overload - def get_pixels(self, filename: str, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt = ..., zend: typing.SupportsInt = ..., datatype: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def get_pixels(self, filename: str, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, roi: ROI, datatype: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - def getattribute(self, name: str, type: TypeDesc | BASETYPE | str = ...) -> typing.Any: ... - def getattributetype(self, name: str) -> TypeDesc: ... - def geterror(self, clear: bool = ...) -> str: ... - def getstats(self, level: typing.SupportsInt = ...) -> str: ... - def invalidate(self, filename: str, force: bool = ...) -> None: ... - def invalidate_all(self, force: bool = ...) -> None: ... - def resolve_filename(self, arg0: str, /) -> str: ... - @property - def has_error(self) -> bool: ... - -class ImageInput: - def __init__(self, *args, **kwargs) -> None: ... - def close(self) -> bool: ... - @staticmethod - def create(filename: str, plugin_searchpath: str = ...) -> ImageInput: ... - def current_miplevel(self) -> int: ... - def current_subimage(self) -> int: ... - def format_name(self) -> str: ... - def get_thumbnail(self, *args, **kwargs): ... - def geterror(self, clear: bool = ...) -> str: ... - @overload - @staticmethod - def open(filename: str) -> ImageInput: ... - @overload - @staticmethod - def open(filename: str, config: ImageSpec) -> ImageInput: ... - @overload - def read_image(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def read_image(self, chbegin: typing.SupportsInt, chend: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def read_image(self, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - def read_native_deep_image(self, subimage: typing.SupportsInt = ..., miplevel: typing.SupportsInt = ...) -> DeepData: ... - def read_native_deep_scanlines(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, z: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt) -> DeepData: ... - def read_native_deep_tiles(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt, zend: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt) -> DeepData: ... - def read_scanline(self, y: typing.SupportsInt, z: typing.SupportsInt = ..., format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def read_scanlines(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, z: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def read_scanlines(self, ybegin: typing.SupportsInt, yend: typing.SupportsInt, z: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - def read_tile(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def read_tiles(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt, zend: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - @overload - def read_tiles(self, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt, zend: typing.SupportsInt, chbegin: typing.SupportsInt, chend: typing.SupportsInt, format: TypeDesc | BASETYPE | str = ...) -> numpy.ndarray | None: ... - def seek_subimage(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, /) -> bool: ... - @overload - def spec(self) -> ImageSpec: ... - @overload - def spec(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt = ...) -> ImageSpec: ... - def spec_dimensions(self, subimage: typing.SupportsInt, miplevel: typing.SupportsInt = ...) -> ImageSpec: ... - def supports(self, arg0: str, /) -> int: ... - def valid_file(self, arg0: str, /) -> bool: ... - @property - def has_error(self) -> bool: ... - -class ImageOutput: - def __init__(self, *args, **kwargs) -> None: ... - def close(self) -> bool: ... - def copy_image(self, arg0: ImageInput, /) -> bool: ... - @staticmethod - def create(filename: str, plugin_searchpath: str = ...) -> ImageOutput: ... - def format_name(self) -> str: ... - def geterror(self, clear: bool = ...) -> str: ... - @overload - def open(self, filename: str, spec: ImageSpec, mode: str = ...) -> bool: ... - @overload - def open(self, filename: str, specs: collections.abc.Sequence[ImageSpec]) -> bool: ... - @overload - def open(self, arg0: str, arg1: tuple, /) -> bool: ... - def set_thumbnail(self, arg0, /) -> bool: ... - def spec(self) -> ImageSpec: ... - def supports(self, arg0: str, /) -> int: ... - def write_deep_image(self, arg0: DeepData, /) -> bool: ... - def write_deep_scanlines(self, ybegin: typing.SupportsInt, yend: typing.SupportsInt, z: typing.SupportsInt, deepdata: DeepData) -> bool: ... - def write_deep_tiles(self, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt, zend: typing.SupportsInt, deepdata: DeepData) -> bool: ... - def write_image(self, arg0: typing_extensions.Buffer, /) -> bool: ... - def write_scanline(self, y: typing.SupportsInt, z: typing.SupportsInt, pixels: typing_extensions.Buffer) -> bool: ... - def write_scanlines(self, ybegin: typing.SupportsInt, yend: typing.SupportsInt, z: typing.SupportsInt, pixels: typing_extensions.Buffer) -> bool: ... - def write_tile(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt, pixels: typing_extensions.Buffer) -> bool: ... - def write_tiles(self, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt, zend: typing.SupportsInt, pixels: typing_extensions.Buffer) -> bool: ... - @property - def has_error(self) -> bool: ... - -class ImageSpec: - alpha_channel: int - channelformats: tuple - channelnames: tuple - deep: bool - depth: int - extra_attribs: ParamValueList - format: TypeDesc - full_depth: int - full_height: int - full_width: int - full_x: int - full_y: int - full_z: int - height: int - nchannels: int - roi: Incomplete - roi_full: Incomplete - tile_depth: int - tile_height: int - tile_width: int - width: int - x: int - y: int - z: int - z_channel: int - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, arg2: typing.SupportsInt, arg3: TypeDesc | BASETYPE | str, /) -> None: ... - @overload - def __init__(self, arg0, arg1: TypeDesc | BASETYPE | str, /) -> None: ... - @overload - def __init__(self, arg0: TypeDesc | BASETYPE | str, /) -> None: ... - @overload - def __init__(self, arg0: ImageSpec, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsFloat, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsInt, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: str, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: TypeDesc | BASETYPE | str, arg2: object, /) -> None: ... - @overload - def channel_bytes(self) -> int: ... - @overload - def channel_bytes(self, channel: typing.SupportsInt, native: bool = ...) -> int: ... - def channel_name(self, arg0: typing.SupportsInt, /) -> str: ... - def channelformat(self, arg0: typing.SupportsInt, /) -> TypeDesc: ... - def channelindex(self, arg0: str, /) -> int: ... - def copy(self) -> ImageSpec: ... - def copy_dimensions(self, other: ImageSpec) -> None: ... - def default_channel_names(self) -> None: ... - def erase_attribute(self, name: str = ..., type: TypeDesc | BASETYPE | str = ..., casesensitive: bool = ...) -> None: ... - def from_xml(self, arg0: str, /) -> None: ... - def get(self, key: str, default: object = ...) -> typing.Any: ... - def get_bytes_attribute(self, name: str, defaultval: str = ...) -> bytes: ... - def get_channelformats(self) -> tuple[TypeDesc, ...]: ... - def get_float_attribute(self, name: str, defaultval: typing.SupportsFloat = ...) -> float: ... - def get_int_attribute(self, name: str, defaultval: typing.SupportsInt = ...) -> int: ... - def get_string_attribute(self, name: str, defaultval: str = ...) -> str: ... - def getattribute(self, name: str, type: TypeDesc | BASETYPE | str = ...) -> typing.Any: ... - @overload - def image_bytes(self, native: bool = ...) -> int: ... - @overload - def image_bytes(self, native: TypeDesc | BASETYPE | str = ...) -> int: ... - def image_pixels(self) -> int: ... - @staticmethod - def metadata_val(param: ParamValue, human: bool = ...) -> str: ... - @overload - def pixel_bytes(self, native: bool = ...) -> int: ... - @overload - def pixel_bytes(self, chbegin: typing.SupportsInt, chend: typing.SupportsInt, native: bool = ...) -> int: ... - @overload - def scanline_bytes(self, native: bool = ...) -> int: ... - @overload - def scanline_bytes(self, arg0: TypeDesc | BASETYPE | str, /) -> int: ... - def serialize(self, format: str = ..., verbose: str = ...) -> str: ... - def set_colorspace(self, name: str) -> None: ... - def set_format(self, arg0: TypeDesc | BASETYPE | str, /) -> None: ... - def size_t_safe(self) -> bool: ... - @overload - def tile_bytes(self, native: bool = ...) -> int: ... - @overload - def tile_bytes(self, arg0: TypeDesc | BASETYPE | str, /) -> int: ... - def tile_pixels(self) -> int: ... - def to_xml(self) -> str: ... - def valid_tile_range(self, xbegin: typing.SupportsInt, xend: typing.SupportsInt, ybegin: typing.SupportsInt, yend: typing.SupportsInt, zbegin: typing.SupportsInt = ..., zend: typing.SupportsInt = ...) -> bool: ... - def __contains__(self, arg0: str, /) -> bool: ... - def __delitem__(self, arg0: str, /) -> None: ... - def __getitem__(self, arg0: str, /) -> object: ... - def __setitem__(self, arg0: str, arg1: object, /) -> None: ... - -class Interp: - __members__: ClassVar[dict] = ... # read-only - CONSTANT: ClassVar[Interp] = ... - INTERP_CONSTANT: ClassVar[Interp] = ... - INTERP_LINEAR: ClassVar[Interp] = ... - INTERP_PERPIECE: ClassVar[Interp] = ... - INTERP_VERTEX: ClassVar[Interp] = ... - LINEAR: ClassVar[Interp] = ... - PERPIECE: ClassVar[Interp] = ... - VERTEX: ClassVar[Interp] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class InterpMode: - __members__: ClassVar[dict] = ... # read-only - Bicubic: ClassVar[InterpMode] = ... - Bilinear: ClassVar[InterpMode] = ... - Closest: ClassVar[InterpMode] = ... - SmartBicubic: ClassVar[InterpMode] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class MakeTextureMode: - __members__: ClassVar[dict] = ... # read-only - MakeTxBumpWithSlopes: ClassVar[MakeTextureMode] = ... - MakeTxEnvLatl: ClassVar[MakeTextureMode] = ... - MakeTxEnvLatlFromLightProbe: ClassVar[MakeTextureMode] = ... - MakeTxShadow: ClassVar[MakeTextureMode] = ... - MakeTxTexture: ClassVar[MakeTextureMode] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class MipMode: - __members__: ClassVar[dict] = ... # read-only - Aniso: ClassVar[MipMode] = ... - Default: ClassVar[MipMode] = ... - NoMIP: ClassVar[MipMode] = ... - OneLevel: ClassVar[MipMode] = ... - Trilinear: ClassVar[MipMode] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class NonFiniteFixMode: - __members__: ClassVar[dict] = ... # read-only - NONFINITE_BLACK: ClassVar[NonFiniteFixMode] = ... - NONFINITE_BOX3: ClassVar[NonFiniteFixMode] = ... - NONFINITE_NONE: ClassVar[NonFiniteFixMode] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class ParamValue: - @overload - def __init__(self, arg0: str, arg1: typing.SupportsInt, /) -> None: ... - @overload - def __init__(self, arg0: str, arg1: typing.SupportsFloat, /) -> None: ... - @overload - def __init__(self, arg0: str, arg1: str, /) -> None: ... - @overload - def __init__(self, name: str, type: TypeDesc | BASETYPE | str, value: object) -> None: ... - @overload - def __init__(self, name: str, type: TypeDesc | BASETYPE | str, nvalues: typing.SupportsInt, interp: Interp, value: object) -> None: ... - @property - def name(self) -> str: ... - @property - def type(self) -> TypeDesc: ... - @property - def value(self) -> object: ... - @property - def __len__(self) -> int: ... - -class ParamValueList: - def __init__(self) -> None: ... - def add_or_replace(self, value: ParamValue, casesensitive: bool = ...) -> None: ... - def append(self, arg0: ParamValue, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsFloat, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsInt, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: str, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: TypeDesc | BASETYPE | str, arg2: object, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: TypeDesc | BASETYPE | str, arg2: typing.SupportsInt, arg3: object, /) -> None: ... - def clear(self) -> None: ... - def contains(self, name: str, type: TypeDesc | BASETYPE | str = ..., casesensitive: bool = ...) -> bool: ... - def free(self) -> None: ... - def merge(self, other: ParamValueList, override: bool = ...) -> None: ... - def remove(self, name: str, type: TypeDesc | BASETYPE | str = ..., casesensitive: bool = ...) -> None: ... - def resize(self, arg0: typing.SupportsInt, /) -> None: ... - def sort(self, casesensitive: bool = ...) -> None: ... - def __contains__(self, arg0: str, /) -> bool: ... - def __delitem__(self, arg0: str, /) -> None: ... - @overload - def __getitem__(self, arg0: typing.SupportsInt, /) -> ParamValue: ... - @overload - def __getitem__(self, arg0: str, /) -> object: ... - def __iter__(self) -> collections.abc.Iterator[ParamValue]: ... - def __len__(self) -> int: ... - def __setitem__(self, arg0: str, arg1: object, /) -> None: ... - -class PixelStats: - def __init__(self) -> None: ... - @property - def avg(self) -> list[float]: ... - @property - def finitecount(self) -> list[int]: ... - @property - def infcount(self) -> list[int]: ... - @property - def max(self) -> list[float]: ... - @property - def min(self) -> list[float]: ... - @property - def nancount(self) -> list[int]: ... - @property - def stddev(self) -> list[float]: ... - @property - def sum(self) -> list[float]: ... - @property - def sum2(self) -> list[float]: ... - -class ROI: - All: ClassVar[ROI] = ... # read-only - chbegin: int - chend: int - xbegin: int - xend: int - ybegin: int - yend: int - zbegin: int - zend: int - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, arg2: typing.SupportsInt, arg3: typing.SupportsInt, /) -> None: ... - @overload - def __init__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, arg2: typing.SupportsInt, arg3: typing.SupportsInt, arg4: typing.SupportsInt, arg5: typing.SupportsInt, /) -> None: ... - @overload - def __init__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, arg2: typing.SupportsInt, arg3: typing.SupportsInt, arg4: typing.SupportsInt, arg5: typing.SupportsInt, arg6: typing.SupportsInt, arg7: typing.SupportsInt, /) -> None: ... - @overload - def __init__(self, arg0: ROI, /) -> None: ... - @overload - def contains(self, x: typing.SupportsInt, y: typing.SupportsInt, z: typing.SupportsInt = ..., ch: typing.SupportsInt = ...) -> bool: ... - @overload - def contains(self, other: ROI) -> bool: ... - def copy(self) -> ROI: ... - def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... - @property - def defined(self) -> bool: ... - @property - def depth(self) -> int: ... - @property - def height(self) -> int: ... - @property - def nchannels(self) -> int: ... - @property - def npixels(self) -> int: ... - @property - def width(self) -> int: ... - -class TextureOpt: - anisotropic: int - conservative_filter: bool - fill: float - firstchannel: int - interpmode: InterpMode - mipmode: MipMode - missingcolor: tuple - rnd: float - rwidth: float - rwrap: Wrap - sblur: float - subimage: int - subimagename: str - swidth: float - swrap: Wrap - tblur: float - twidth: float - twrap: Wrap - def __init__(self) -> None: ... - -class TextureSystem: - def __init__(self, shared: bool = ...) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsFloat, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: typing.SupportsInt, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: str, /) -> None: ... - @overload - def attribute(self, arg0: str, arg1: TypeDesc | BASETYPE | str, arg2: object, /) -> None: ... - def close(self, filename: str) -> None: ... - def close_all(self) -> None: ... - @staticmethod - def destroy(arg0: TextureSystem, /) -> None: ... - def environment(self, filename: str, options: TextureOpt, R, dRdx, dRdy, nchannels: typing.SupportsInt) -> tuple[float, ...]: ... - def getattribute(self, name: str, type: TypeDesc | BASETYPE | str = ...) -> typing.Any: ... - def getattributetype(self, name: str) -> TypeDesc: ... - def geterror(self, clear: bool = ...) -> str: ... - def getstats(self, level: typing.SupportsInt = ..., icstats: bool = ...) -> str: ... - def has_error(self) -> bool: ... - def imagespec(self, filename: str, subimage: typing.SupportsInt = ...) -> ImageSpec | None: ... - def invalidate(self, filename: str, force: bool = ...) -> None: ... - def invalidate_all(self, force: bool = ...) -> None: ... - def inventory_udim(self, filename: str) -> tuple: ... - def is_udim(self, filename: str) -> bool: ... - def reset_stats(self) -> None: ... - def resolve_filename(self, filename: str) -> str: ... - def resolve_udim(self, filename: str, s: typing.SupportsFloat, t: typing.SupportsFloat) -> str: ... - def texture(self, filename: str, options: TextureOpt, s: typing.SupportsFloat, t: typing.SupportsFloat, dsdx: typing.SupportsFloat, dtdx: typing.SupportsFloat, dsdy: typing.SupportsFloat, dtdy: typing.SupportsFloat, nchannels: typing.SupportsInt) -> tuple[float, ...]: ... - def texture3d(self, filename: str, options: TextureOpt, P, dPdx, dPdy, dPdz, nchannels: typing.SupportsInt) -> tuple[float, ...]: ... - -class TypeDesc: - aggregate: AGGREGATE - arraylen: int - basetype: BASETYPE - vecsemantics: VECSEMANTICS - @overload - def __init__(self) -> None: ... - @overload - def __init__(self, arg0: TypeDesc | BASETYPE | str, /) -> None: ... - @overload - def __init__(self, arg0: BASETYPE, /) -> None: ... - @overload - def __init__(self, arg0: BASETYPE, arg1: AGGREGATE, /) -> None: ... - @overload - def __init__(self, arg0: BASETYPE, arg1: AGGREGATE, arg2: VECSEMANTICS, /) -> None: ... - @overload - def __init__(self, arg0: BASETYPE, arg1: AGGREGATE, arg2: VECSEMANTICS, arg3: typing.SupportsInt, /) -> None: ... - @overload - def __init__(self, arg0: str, /) -> None: ... - def basesize(self) -> int: ... - def basevalues(self) -> int: ... - def c_str(self) -> str: ... - def elementsize(self) -> int: ... - def elementtype(self) -> TypeDesc: ... - def equivalent(self, arg0: TypeDesc | BASETYPE | str, /) -> bool: ... - def fromstring(self, arg0: str, /) -> None: ... - def is_box2(self, arg0: BASETYPE, /) -> bool: ... - def is_box3(self, arg0: BASETYPE, /) -> bool: ... - def is_vec2(self, arg0: BASETYPE, /) -> bool: ... - def is_vec3(self, arg0: BASETYPE, /) -> bool: ... - def is_vec4(self, arg0: BASETYPE, /) -> bool: ... - def numelements(self) -> int: ... - def size(self) -> int: ... - def unarray(self) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... - -class VECSEMANTICS: - __members__: ClassVar[dict] = ... # read-only - BOX: ClassVar[VECSEMANTICS] = ... - COLOR: ClassVar[VECSEMANTICS] = ... - KEYCODE: ClassVar[VECSEMANTICS] = ... - NORMAL: ClassVar[VECSEMANTICS] = ... - NOSEMANTICS: ClassVar[VECSEMANTICS] = ... - NOXFORM: ClassVar[VECSEMANTICS] = ... - POINT: ClassVar[VECSEMANTICS] = ... - RATIONAL: ClassVar[VECSEMANTICS] = ... - TIMECODE: ClassVar[VECSEMANTICS] = ... - VECTOR: ClassVar[VECSEMANTICS] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -class Wrap: - __members__: ClassVar[dict] = ... # read-only - Black: ClassVar[Wrap] = ... - Clamp: ClassVar[Wrap] = ... - Default: ClassVar[Wrap] = ... - Last: ClassVar[Wrap] = ... - Mirror: ClassVar[Wrap] = ... - Periodic: ClassVar[Wrap] = ... - PeriodicPow2: ClassVar[Wrap] = ... - PeriodicSharedBorder: ClassVar[Wrap] = ... - __entries: ClassVar[dict] = ... - def __init__(self, value: typing.SupportsInt) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __hash__(self) -> int: ... - def __index__(self) -> int: ... - def __int__(self) -> int: ... - def __ne__(self, other: object) -> bool: ... - @property - def name(self): ... - @property - def value(self) -> int: ... - -@overload -def attribute(arg0: str, arg1: typing.SupportsFloat, /) -> None: ... -@overload -def attribute(arg0: str, arg1: typing.SupportsInt, /) -> None: ... -@overload -def attribute(arg0: str, arg1: str, /) -> None: ... -@overload -def attribute(arg0: str, arg1: TypeDesc | BASETYPE | str, arg2: object, /) -> None: ... -def equivalent_colorspace(arg0: str, arg1: str, /) -> bool: ... -def get_bytes_attribute(name: str, defaultval: str = ...) -> bytes: ... -def get_float_attribute(name: str, defaultval: typing.SupportsFloat = ...) -> float: ... -def get_int_attribute(name: str, defaultval: typing.SupportsInt = ...) -> int: ... -def get_roi(arg0: ImageSpec, /) -> ROI: ... -def get_roi_full(arg0: ImageSpec, /) -> ROI: ... -def get_string_attribute(name: str, defaultval: str = ...) -> str: ... -def getattribute(arg0: str, arg1: TypeDesc | BASETYPE | str, /) -> typing.Any: ... -def geterror(clear: bool = ...) -> str: ... -def intersection(arg0: ROI, arg1: ROI, /) -> ROI: ... -def is_imageio_format_name(name: str) -> bool: ... -def set_colorspace(spec: ImageSpec, name: str) -> None: ... -def set_colorspace_rec709_gamma(arg0: ImageSpec, arg1: typing.SupportsFloat, /) -> None: ... -def set_roi(arg0: ImageSpec, arg1: ROI, /) -> None: ... -def set_roi_full(arg0: ImageSpec, arg1: ROI, /) -> None: ... -def union(arg0: ROI, arg1: ROI, /) -> ROI: ... diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 400850e9df..228d6aa543 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -5,9 +5,9 @@ // R3D SDK can be downloaded from the following site: // https://www.red.com/download/r3d-sdk // -// The code has been tested with the version 9.0.0 BETA1 installed in -// /opt/R3DSDKv9_0_0-BETA1 directory and setting up the variable -// export R3DSDK_ROOT="/opt/R3DSDKv9_0_0-BETA1" +// The code has been tested with the version 9.1.1 installed in +// /opt/R3DSDKv9_1_1 directory and setting up the variable +// export R3DSDK_ROOT="/opt/R3DSDKv9_1_1" #include #include @@ -149,7 +149,7 @@ OIIO_EXPORT const char* r3d_imageio_library_version() { // Note: SDK version can differ from the actual library loaded - return "R3D 9.0.0 BETA1"; + return "R3D 9.1.1"; } OIIO_EXPORT ImageInput* @@ -158,7 +158,7 @@ r3d_input_imageio_create() return new R3dInput; } -OIIO_EXPORT const char* r3d_input_extensions[] = { "r3d", nullptr }; +OIIO_EXPORT const char* r3d_input_extensions[] = { "r3d", "nev", nullptr }; OIIO_PLUGIN_EXPORTS_END @@ -172,11 +172,11 @@ R3dInput::initialize() std::string library_path = Sysutil::getenv("OIIO_R3D_LIBRARY_PATH", #if defined(__linux__) - "/opt/R3DSDKv9_0_0-BETA1/Redistributable/linux" + "/opt/R3DSDKv9_1_1/Redistributable/linux" #elif defined(__APPLE__) - "/Library/R3DSDKv9_0_0-BETA1/Redistributable/mac" + "/Library/R3DSDKv9_1_1/Redistributable/mac" #elif defined(__WINDOWS__) - "C:\\R3DSDKv9_0_0-BETA1\\Redistributable\\win" + "C:\\R3DSDKv9_1_1\\Redistributable\\win" #else # error "Unknown OS" #endif From 1de9a1fcd042a36233c3c9dc0f52e0baab6e445a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Fri, 31 Oct 2025 15:31:30 +0100 Subject: [PATCH 26/27] Update to the R3DSDK 9.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 228d6aa543..130675a5dd 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -6,8 +6,8 @@ // https://www.red.com/download/r3d-sdk // // The code has been tested with the version 9.1.1 installed in -// /opt/R3DSDKv9_1_1 directory and setting up the variable -// export R3DSDK_ROOT="/opt/R3DSDKv9_1_1" +// /opt/R3DSDKv9_1_2 directory and setting up the variable +// export R3DSDK_ROOT="/opt/R3DSDKv9_1_2" #include #include @@ -149,7 +149,7 @@ OIIO_EXPORT const char* r3d_imageio_library_version() { // Note: SDK version can differ from the actual library loaded - return "R3D 9.1.1"; + return "R3D 9.1.2"; } OIIO_EXPORT ImageInput* @@ -172,11 +172,11 @@ R3dInput::initialize() std::string library_path = Sysutil::getenv("OIIO_R3D_LIBRARY_PATH", #if defined(__linux__) - "/opt/R3DSDKv9_1_1/Redistributable/linux" + "/opt/R3DSDKv9_1_2/Redistributable/linux" #elif defined(__APPLE__) - "/Library/R3DSDKv9_1_1/Redistributable/mac" + "/Library/R3DSDKv9_1_2/Redistributable/mac" #elif defined(__WINDOWS__) - "C:\\R3DSDKv9_1_1\\Redistributable\\win" + "C:\\R3DSDKv9_1_2\\Redistributable\\win" #else # error "Unknown OS" #endif From f5580029c6e5d0abb529b56fd02c175e6df8d92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Kov=C3=A1=C5=99?= Date: Sat, 1 Nov 2025 13:15:22 +0100 Subject: [PATCH 27/27] Corrected the SDK version in comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Kovář --- src/r3d.imageio/r3dinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r3d.imageio/r3dinput.cpp b/src/r3d.imageio/r3dinput.cpp index 130675a5dd..fe90b5ebed 100644 --- a/src/r3d.imageio/r3dinput.cpp +++ b/src/r3d.imageio/r3dinput.cpp @@ -5,7 +5,7 @@ // R3D SDK can be downloaded from the following site: // https://www.red.com/download/r3d-sdk // -// The code has been tested with the version 9.1.1 installed in +// The code has been tested with the version 9.1.2 installed in // /opt/R3DSDKv9_1_2 directory and setting up the variable // export R3DSDK_ROOT="/opt/R3DSDKv9_1_2"