Skip to content
  • Jehan's avatar
    plug-ins: open a dialog to select color space of JPEG 2000 codestream. · 7e52c483
    Jehan authored
    JPEG 2000 codestream (.j2k/.j2c) are only compressed code stream data,
    without header. In particular we don't have color information, such as
    the color space. So we need to open a dialog asking to set the color
    space in interactive mode.
    
    Note: according to OpenJPEG developers, a JP2 image (not codestream)
    should always have a color space defined in its header. But just to be
    flexible, the same dialog may get raised as well if we try to load a JP2
    with no valid color space defined in header and no ICC profile embedded.
    Maybe if such a thing happened, it means the image is corrupt, yet we
    may as well try and salvage it anyway.
    
    Note 2: I also removed a weird test which was setting some images as
    being YUV color space by mistake. This actually fixes bug 794413 as a
    side effect.
    7e52c483