[sldev] Cache politics: OpenJPEG and colour spaces

Carsten Juttner carjay at gmx.net
Wed Jun 18 11:29:10 PDT 2008


John Hurliman wrote:
> The source code line I referenced, llimagej2coj.cpp:282, points to 
> where all textures being uploaded to the grid are converted to sRGB 
> color-space. This is the default for JPEG2000, and although someone 
> could technically use a third party client to upload an image with an 
> embedded color profile it would be discarded.

I guess whoever wrote that code was using some example code from OpenJPEG.

The colour space setting is only used in case you generate a JP2-file 
(which is an optional file format to wrap the JPEG2000 codestream into) 
and is the only enumerated RGB colour space offered for that format. You 
are free to embed your own ICC profile in it though.

The SL viewer uses the JPEG2000 codestream itself which makes no 
assumptions what colour space is used or even what the components are, 
that information is simply not stored. You are free to encode the 
components in RGB, YUV, XYZ or any colour space you would like.


Carsten



More information about the SLDev mailing list