From 3f76f4cb00413fd49b617d586e93411e5f6b9edb Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 9 Dec 2019 23:45:16 +1100 Subject: [PATCH] correctly identify openimageio data as alpha associated Also added note for potential concern regarding alpha association. --- app/decoder/oiio/oiiodecoder.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/decoder/oiio/oiiodecoder.cpp b/app/decoder/oiio/oiiodecoder.cpp index 7b304b1a2..9702ed148 100644 --- a/app/decoder/oiio/oiiodecoder.cpp +++ b/app/decoder/oiio/oiiodecoder.cpp @@ -55,6 +55,11 @@ bool OIIODecoder::Probe(Footage *f) image_stream->set_width(spec.width); image_stream->set_height(spec.height); + // OIIO automatically premultiplies alpha + // FIXME: We usually disassociate the alpha for the color management later, for 8-bit images this likely reduces the + // fidelity? + image_stream->set_premultiplied_alpha(true); + f->add_stream(image_stream); // If we're here, we have a successful image open @@ -100,6 +105,7 @@ bool OIIODecoder::Open() return true; } +#include FramePtr OIIODecoder::RetrieveVideo(const rational &timecode) { if (!open_ && !Open()) {