[Bf-committers] Patch: OCIO Parse Colorspace From Filename
sergey.vfx at gmail.com
Mon Dec 11 14:56:37 CET 2017
This patch seems to have the following priority:
- Image loader sets color space (based on either image header or other
- The higher level reader then might override the color space based on file
If we allow such an automatic guess, it should be other way around. If the
file knows it's color space, it should be trusted, as it is more trustful
than a file name.
Dalai, sRGB and linear are only from fallback implementation which is only
used when OCIO is disabled. If OCIO is enabled, then the coded uses
function from OCIO to guess the color space based on the current
Troy, please follow code style as Dalai already mentioned, and also don't
use camel case for variables in Blender.
On Mon, Dec 11, 2017 at 2:44 PM, Xavier Thomas <xavier.thomas.1980 at gmail.com
> It is difficult to tell from the patch without knowing where the "
> IMB_loadifffile" function in readimage.c is called, but I suppose this only
> tries to better auto-detect the file's colorspace when the user open a new
> image but after that the image colorspace setting is honored.
> 2017-12-11 8:47 GMT-02:00 Sybren A. Stüvel <sybren at stuvel.eu>:
> > On 2017-12-11 11:39, Dalai Felinto wrote:
> >> Aren't you mixing color space and lens deformation? Troy is referring to
> >> the former, while you seem to be talking about the latter.
> > Yes, and that's on purpose, as it shows the danger of trying to extract
> > semantics from file names.
> > That said, if you do use "_linear" as a suffix for your filenames, the
> >> image will be opened as linear, although you may not want it in some
> >> cases like yours. The patch could have this as an option for the file
> >> dialog, similar to how we do for multi-view, but in this case, on by
> >> default.
> > I agree. IMO it should also be explicit that the file name matters when
> > comes to colour interpretation. I think an option "Guess colour space
> > filename" with a bit more explanation in the tooltip would suffice.
> > What would happen with AdobeRGB data in "planks_linear.jpg"? In other
> > words, who wins when the filename and embedded profile are conficting?
> > Sybren
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > https://lists.blender.org/mailman/listinfo/bf-committers
> Bf-committers mailing list
> Bf-committers at blender.org
With best regards, Sergey Sharybin
More information about the Bf-committers