While answering this, I realized that the docs could be improved: https://github.com/OpenImageIO/oiio/pull/2952
> On Apr 20, 2021, at 6:52 PM, Larry Gritz <l...@larrygritz.com> wrote: > > I'm definitely getting to the edge of my color science knowledge here... > > The JPEG reader knows that JPEG files are always sRGB and tags the ImageSpec > as such. The PNG reader doesn't appear to do this (though maybe it should? I > would need to read the PNG spec carefully to be sure). > > That probably explains the difference in behavior. > > The OIIO documentation for oiiotool --ociodisplay says it takes the following > optional modifier: > > `from=` *val* > Assume the image is in the named color space. If no `from=` is > supplied, it will try to deduce it from the image's metadata or > previous `--iscolorspace` directives. > > So when you read the JPEG file and apply an OCIO display transform, it is > (presumably correctly) deducing that if it came from a JPEG, it must be sRGB. > But when you read the PNG, it is not making that assumption (for better or > for worse), so it has no idea what color space it's in, so it will probably > guess that it's scene linear, which is almost certainly wrong for a PNG. > > > >> On Apr 20, 2021, at 6:36 PM, Jose Alejandro Enriquez >> <jose.enriq...@pixomondo.com <mailto:jose.enriq...@pixomondo.com>> wrote: >> >> To be honest, I am not, I am just applying for a ocio display to the source >> file. For some reason it behaves different in pngs and jpgs. >> >> The main question is why is there a difference between those 2 extensions >> and why does it require a sRGB colorspace by default, because if the OCIO >> doesn't have it, it should look for a role but not raise an error. >> >> -- >> Jose Alejandro Enriquez >> Pipeline TD, PIXOMONDO >> Skype Name: live:.cid.90318dda1ebc48cf >> From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org >> <mailto:oiio-dev-boun...@lists.openimageio.org>> on behalf of Larry Gritz >> <l...@larrygritz.com <mailto:l...@larrygritz.com>> >> Sent: Tuesday, April 20, 2021 6:17 PM >> To: OpenImageIO dev list <oiio-dev@lists.openimageio.org >> <mailto:oiio-dev@lists.openimageio.org>> >> Subject: Re: [Oiio-dev] OIIO Tool requires to have a sRGB colorspace when >> converting a jpg file. >> >> I defer to OCIO experts on the details, but yeah, if you're just trying to >> get it from sRGB into ACES, then I believe it's generally --colorconvert >> that you want to use, not --ociodisplay. >> >> So something like >> >> oiiotool my.jpg --colorconvert srgb_texture acescg -o acescg.exr >> >> >> Also, you can use --autocc to do it all automatically upon input and output, >> if your studio has a convention of embedding your color space namesake in >> your filenames! >> >> oiiotool --autocc my_srgb_texture.jpg -o my_acescg.exr >> >> >> >>> On Apr 20, 2021, at 2:38 PM, Daniel Flehner Heen <flehnerhee...@gmail.com >>> <mailto:flehnerhee...@gmail.com>> wrote: >>> >>> Ah, ok. Sorry, I misunderstood your question. >>> >>> What colorspace does the source jpg have? >>> And is your goal to go from that colorspace to aces? >>> >>> Have you tried just using the --colorconvert option? >>> --colorconvert SRC DST Convert pixels from 'src' to 'dst' color >>> space (options: key=, value=, unpremult=, strict=) >>> >>> >>> On Tue, Apr 20, 2021, 23:26 Jose Alejandro Enriquez >>> <jose.enriq...@pixomondo.com <mailto:jose.enriq...@pixomondo.com>> wrote: >>> Agree Daniel, the issue is that if I don't specify the colorspace it is >>> asking me for sRGB by default, and even if I add iscolorspace or colorspace >>> convert for some reason it still asks to have sRGB in the ocio config. >>> >>> -- >>> Jose Alejandro Enriquez >>> Pipeline TD, PIXOMONDO >>> Skype Name: live:.cid.90318dda1ebc48cf >>> From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org >>> <mailto:oiio-dev-boun...@lists.openimageio.org>> on behalf of Daniel >>> Flehner Heen <flehnerhee...@gmail.com <mailto:flehnerhee...@gmail.com>> >>> Sent: Tuesday, April 20, 2021 5:10 PM >>> To: OpenImageIO developers <oiio-dev@lists.openimageio.org >>> <mailto:oiio-dev@lists.openimageio.org>> >>> Subject: Re: [Oiio-dev] OIIO Tool requires to have a sRGB colorspace when >>> converting a jpg file. >>> >>> I use Output - sRGB a.k.a out_srgb for sRGB and it gives a nice result. >>> Please note that it behaves a bit different than sRGB in nuke for instance. >>> It doesn't clip. >>> >>> On Tue, Apr 20, 2021, 23:00 Jose Alejandro Enriquez >>> <jose.enriq...@pixomondo.com <mailto:jose.enriq...@pixomondo.com>> wrote: >>> For sure: >>> >>> >>> >>> -- >>> Jose Alejandro Enriquez >>> Pipeline TD, PIXOMONDO >>> Skype Name: live:.cid.90318dda1ebc48cf >>> From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org >>> <mailto:oiio-dev-boun...@lists.openimageio.org>> on behalf of Larry Gritz >>> <l...@larrygritz.com <mailto:l...@larrygritz.com>> >>> Sent: Tuesday, April 20, 2021 4:54 PM >>> To: OpenImageIO dev list <oiio-dev@lists.openimageio.org >>> <mailto:oiio-dev@lists.openimageio.org>> >>> Subject: Re: [Oiio-dev] OIIO Tool requires to have a sRGB colorspace when >>> converting a jpg file. >>> >>> if you do >>> >>> oiiotool --help >>> >>> can you reply here with exactly what it says in the section that lists >>> "OpenColorIO", "Known color spaces", and "Known displays"? >>> >>> >>>> On Apr 20, 2021, at 1:49 PM, Jose Alejandro Enriquez >>>> <jose.enriq...@pixomondo.com <mailto:jose.enriq...@pixomondo.com>> wrote: >>>> >>>> We have Utility - sRGB - Texture and srgb_texture, which are the >>>> colorspaces names in ACES of the equivalent. >>>> >>>> -- >>>> Jose Alejandro Enriquez >>>> Pipeline TD, PIXOMONDO >>>> Skype Name: live:.cid.90318dda1ebc48cf >>>> From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org >>>> <mailto:oiio-dev-boun...@lists.openimageio.org>> on behalf of Larry Gritz >>>> <l...@larrygritz.com <mailto:l...@larrygritz.com>> >>>> Sent: Tuesday, April 20, 2021 4:45 PM >>>> To: OpenImageIO dev list <oiio-dev@lists.openimageio.org >>>> <mailto:oiio-dev@lists.openimageio.org>> >>>> Subject: Re: [Oiio-dev] OIIO Tool requires to have a sRGB colorspace when >>>> converting a jpg file. >>>> >>>> Is there no color space in your OCIO config that is approximately sRGB? >>>> Nothing appropriate for video display? >>>> >>>> >>>>> On Apr 20, 2021, at 1:24 PM, Jose Alejandro Enriquez >>>>> <jose.enriq...@pixomondo.com <mailto:jose.enriq...@pixomondo.com>> wrote: >>>>> >>>>> Considering: >>>>> OCIO=aces_config.ocio with custom view >>>>> >>>>> Command: >>>>> oiiotool -i X:\20210420\WalkNTalk_75mm_ACAM.1001.jpg --fit:filter=keys >>>>> 1024x0 --ociodisplay "ACES" "Custom View" --ch R,G,B -o >>>>> c:\users\jose~1.enr\appdata\local\temp\426296319.jpg >>>>> >>>>> -- >>>>> Jose Alejandro Enriquez >>>>> Pipeline TD, PIXOMONDO >>>>> Skype Name: live:.cid.90318dda1ebc48cf >>>>> From: Oiio-dev <oiio-dev-boun...@lists.openimageio.org >>>>> <mailto:oiio-dev-boun...@lists.openimageio.org>> on behalf of Larry Gritz >>>>> <l...@larrygritz.com <mailto:l...@larrygritz.com>> >>>>> Sent: Tuesday, April 20, 2021 4:13 PM >>>>> To: OpenImageIO dev list <oiio-dev@lists.openimageio.org >>>>> <mailto:oiio-dev@lists.openimageio.org>> >>>>> Subject: Re: [Oiio-dev] OIIO Tool requires to have a sRGB colorspace when >>>>> converting a jpg file. >>>>> >>>>> Can you show us the oiiotool command line, so we can understand exactly >>>>> what commands and arguments you're using? >>>>> >>>>> >>>>>> On Apr 20, 2021, at 1:06 PM, Jose Alejandro Enriquez >>>>>> <jose.enriq...@pixomondo.com <mailto:jose.enriq...@pixomondo.com>> wrote: >>>>>> >>>>>> Hello!, >>>>>> >>>>>> I am currently using OIIO 2 with OCIO support, recently I began to >>>>>> transform some JPGs but as we are now working with ACES, we don't have >>>>>> sRGB as a colorspace in our pipeline, so I am having an error when >>>>>> trying to convert JPGs >>>>>> >>>>>> oiiotool ERROR: ociodisplay : DisplayTransform error. Cannot find >>>>>> inputColorSpace, named 'sRGB'. >>>>>> >>>>>> My workaround is to duplicate an alias srgb_texture and call it sRGB in >>>>>> the OCIO config but I wonder if this is something that can be changed? >>>>>> so it doesn't rely on that specific colorspace for a JPG. >>>>>> >>>>>> Also ,I am using a 2.0 version, so not sure if this has been changed in >>>>>> a newer version. >>>>>> >>>>>> Cheers, >>>>>> -- >>>>>> Jose Alejandro Enriquez >>>>>> Pipeline TD, PIXOMONDO >>>>>> Skype Name: live:.cid.90318dda1ebc48cf >>>>>> _______________________________________________ >>>>>> Oiio-dev mailing list >>>>>> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >>>>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>>>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >>>>> -- >>>>> Larry Gritz >>>>> l...@larrygritz.com <mailto:l...@larrygritz.com> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Oiio-dev mailing list >>>>> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >>>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >>>> -- >>>> Larry Gritz >>>> l...@larrygritz.com <mailto:l...@larrygritz.com> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Oiio-dev mailing list >>>> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >>> -- >>> Larry Gritz >>> l...@larrygritz.com <mailto:l...@larrygritz.com> >>> >>> >>> >>> >>> _______________________________________________ >>> Oiio-dev mailing list >>> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >>> _______________________________________________ >>> Oiio-dev mailing list >>> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >>> _______________________________________________ >>> Oiio-dev mailing list >>> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> >> >> -- >> Larry Gritz >> l...@larrygritz.com <mailto:l...@larrygritz.com> >> >> >> >> >> _______________________________________________ >> Oiio-dev mailing list >> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org >> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > -- > Larry Gritz > l...@larrygritz.com <mailto:l...@larrygritz.com> > > > > > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz l...@larrygritz.com
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org