cielab to srgb conversion

  • njfranck

    njfranck - 2011-07-08

    I've being trying to play with color spaces in kakadu (and it is pretty

    Here was my command:
    kdu_compress -i lena512color_cie.tif Stiles='{256,256}' Clevels=8 Clayers=8
    -rate 24 Corder=RPCL -jpx_space CIELab -no_weights -o cielab.jpx



    That last image has really strange colors ;-)

    although also uses the color-transformations, the color profile is only
    recognized in and applied.
    The logfile only reports color conversion in the case of JTL.

    First I thought that the color-transformations to srgb was done automatically
    by the core of kakadu, but the
    difference between kdu_render and kdu_expand shows that color information must
    be supplied to the
    decoder.. (I looked in the code of kdu_expand.cpp for information ;-)).
    Otherwise everything is treated as RGB,
    I think.

    It's pretty confusing of what kakadu does in fact with the colorspace
    information: does it use it only when decoding
    to other formats, so leaving the source color space intact?

    thanks in advance

  • Ruven

    Ruven - 2011-07-13

    I've had a look and it seems that Kakadu will convert automatically to sRGB,
    which means that the JTL command is doing a conversion on an already converted
    image. The Kakadu CVT code does not in fact do any CIELAB conversion. I guess
    a simple solution would be to force the colourspace variable to sRGB in the
    loadImageInfo() function in for CIELAB images.

    I'll put a more generic fix in SVN later.

  • Ruven

    Ruven - 2011-07-22

    OK, I've updated the code in SVN to now correctly handle CIELAB to sRGB
    conversion for JPEG2000. 16bit JPEG2000 is also now handled.



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks