Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue412 revisited #428

Closed
gcode-importer opened this issue Nov 13, 2014 · 3 comments
Closed

issue412 revisited #428

gcode-importer opened this issue Nov 13, 2014 · 3 comments

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 428

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


Reported by szukw000 on 2014-11-13 17:15:48

@gcode-importer
Copy link
Author

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.

Reported by mayeut on 2014-11-14 21:35:32

@gcode-importer
Copy link
Author

Patch tested against the whole test suite with no regressions

Reported by mayeut on 2014-11-15 11:56:59

  • Status changed: Verified

- _Attachment: [issue428.patch](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-428/comment-2/issue428.patch)_

@gcode-importer
Copy link
Author

This issue was closed by revision r2925.

Reported by mayeut on 2014-11-17 21:46:57

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant