iron261 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

issue412 revisited #428

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Log message
[trunk] fixed a bug preventing palette image with cdef to decode properly (fixes
 issue 412 )

'opj_jp2_apply_cdef()' is shifted down below 'opj_jp2_apply_pclr():

jp2.c, opj_jp2_decode(), line 1420:

        if(jp2->color.jp2_pclr) {
            /* Part 1, I.5.3.4: Either both or none : */
            if( !jp2->color.jp2_pclr->cmap)
                opj_jp2_free_pclr(&(jp2->color));
            else
                opj_jp2_apply_pclr(p_image, &(jp2->color));
        }

        /* Apply the color space if needed */
        if(jp2->color.jp2_cdef) {
            opj_jp2_apply_cdef(p_image, &(jp2->color));
        }

But here it is not shifted down:
jp2.c, opj_jp2_get_tile((), line 2708:

    if(p_jp2->color.jp2_cdef) {
        opj_jp2_apply_cdef(p_image, &(p_jp2->color));
    }

    if(p_jp2->color.jp2_pclr) {
        /* Part 1, I.5.3.4: Either both or none : */
        if( !p_jp2->color.jp2_pclr->cmap)
            opj_jp2_free_pclr(&(p_jp2->color));
        else
            opj_jp2_apply_pclr(p_image, &(p_jp2->color));
    }

winfried

Original issue reported on code.google.com by szukw...@arcor.de on 13 Nov 2014 at 5:15

GoogleCodeExporter commented 9 years ago
Winfried,

Thanks for pointing this out. I could easily verify this adding -t 0 to 
opj_decompress command line.

Waiting for other commits before doing anything.

Original comment by m.darb...@gmail.com on 14 Nov 2014 at 9:35

GoogleCodeExporter commented 9 years ago
Patch tested against the whole test suite with no regressions

Original comment by m.darb...@gmail.com on 15 Nov 2014 at 11:56

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2925.

Original comment by m.darb...@gmail.com on 17 Nov 2014 at 9:46