Re: [Oiio-dev] "Corrupt" Image Output on Windows?

2022-01-29 Thread Larry Gritz
Doesn't ring a bell for me, but 2.1.9 is from late 2019, so maybe it's something that has long since been fixed? https://github.com/microsoft/vcpkg/blob/master/ports/openimageio/vcpkg.json Seems to indicate that the cu

Re: [Oiio-dev] openEXR adding/writing channels/layers to file?

2022-01-29 Thread Larry Gritz
If I understand your example correctly, you are laying out your pixel data in memory as: RR GG BB but in general OIIO wants each pixel to be contiguous, like RGB RGB RGB RGB RGB RGB RGB RGB RGB RGB So like this: int npixels = xres * yres; for (auto pixel = 0;

Re: [Oiio-dev] openEXR adding/writing channels/layers to file?

2022-01-29 Thread Larry Gritz
Channels are like R, G, B -- the values that constitute each pixel. Subimages are, for a few image file formats that support them, when you have multiple images in one file. One example is how a movie file consists of a different image for each frame. Another example is if you have stereo images

Re: [Oiio-dev] openEXR adding/writing channels/layers to file?

2022-01-29 Thread Dariusz
Hey Ok I'm giving up for today. I'm sure I'm missing comma somewhere or something... but here is what I get > It should be RGB with each channel incremented by 0.2 in value, so red 0, green 0.2, blur 0,4. Then remaining 3 channels increment in 0.6/0.8/1.0 as flat colours. int channels =

[Oiio-dev] Brew, M1 ARM support... ?

2022-01-29 Thread Dariusz
Hey I'm trying to wrap my head around how can I get this library to run on M1 arm arch. Ive used brew install openimageio & that went "well". But when I try to link it/use it in my cmake project via > find_package(OpenImageIO CONFIG REQUIRED) target_link_libraries(testApp OpenImageIO::OpenImag

Re: [Oiio-dev] openEXR adding/writing channels/layers to file?

2022-01-29 Thread Dariusz
Hello Woa that was fast ! Thank you!!! Hmmm I just discovered OIIO::ImageOutput::AppendSubimage, I take this is not what I want then... ? Your explanation with compression/etc makes total sense. This subimage must be something different then, gotta read in. for (auto &maskData:g.second.mMask

Re: [Oiio-dev] openEXR adding/writing channels/layers to file?

2022-01-29 Thread Larry Gritz
The only thing I would add to your example is that there is no need to set channelformats at all if the channels are the same data type. In that case, you just need to set ImageSpec.format. Only when you have mixed data types for the channels is channelformats used (and regular ImageSpec.format

[Oiio-dev] openEXR adding/writing channels/layers to file?

2022-01-29 Thread Dariusz
Hey I'm fairly new to this amazing lib. Just trying to wrap my head around it. I've opened one of exr files that has multiple layers, I did some edits to few of them and now I'd like tow rite them out again in to file. Either current one, or new one... I've started with docs examples & start