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

pclr-cmap-cdef #82

Closed
GoogleCodeExporter opened this issue Jul 18, 2015 · 7 comments
Closed

pclr-cmap-cdef #82

GoogleCodeExporter opened this issue Jul 18, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

The patch file for 'Raw color index data and other PDF issues'
disappears anywhere.

Here it is attached.

On Aug 22 2011, 1.26 pm, Antonin wrote:

>Your patch triggers new errors in the test suite

'j2k_to_image.c' AND 'j2k_dump.c' need an 'opj_jp2_color_t'
structure.

To avoid such kind of issues I have chosen to
dynamically allocate the 'opj_jp2_color_t' structure.

The JPX application program now must read and free the
components of the structure before the structure is
freed in 'opj_destroy_decompress'.

winfried


Original issue reported on code.google.com by szukw...@arcor.de on 30 Aug 2011 at 2:23

Attachments:

@GoogleCodeExporter
Copy link
Author

Antonin, the above patch is incomplete. 

Do NOT use it.

The change in 'openjpeg.c' is missing.

New patch follows.

winfried

Original comment by szukw...@arcor.de on 30 Aug 2011 at 11:22

@GoogleCodeExporter
Copy link
Author

This is the final patch.

The 'opj_jp2_color_t' structure is NOT dynamically allocated.

Instead, as proposed first, the JPX reader must have a pointer
to a local structure:

static opj_jp2_color_t color;

opj_bool decode_jpx(unsigned char *buf, int buf_len)
{

    dinfo = opj_create_decompress(CODEC_JP2);
/*----------------------------*/
    dinfo->color = &color;

    memset(&color, 0, sizeof(opj_jp2_color_t));
    color.serve_jpx = OPJ_TRUE;
/*----------------------------*/

}

'j2k_to_image()' and 'j2k_dump()' can be called without such
pointer. Cnf. 'opj_jp2_decode()'.

A writer naturally must have such a pointer to a local structure
too: the writer fills the structure and 'jp2_write_xyz()' uses
it.

Please inform me if you accept this patch: the extended COLR box must
be implemented.

winfried

Original comment by szukw...@arcor.de on 30 Aug 2011 at 1:56

Attachments:

@GoogleCodeExporter
Copy link
Author

Antonin, the following patch must be observed because - unfortunately -
this line of code is slipped through: as there no longer is a dynamically
allocated structure, the line must be removed.

winfried

--- OpenJPEG-1.4.0-revision-898-4/libopenjpeg/jp2.c.v01 2011-08-30 
16:05:04.000000000 +0200
+++ OpenJPEG-1.4.0-revision-898-4/libopenjpeg/jp2.c 2011-08-30 
16:05:19.000000000 +0200
@@ -994,7 +994,6 @@
    if(color)
    {
    free_color_data(color);
-   opj_free(color);
    jp2->cinfo->color = NULL;
    }
 }

Original comment by szukw...@arcor.de on 30 Aug 2011 at 2:17

@GoogleCodeExporter
Copy link
Author

What is the status of this patch ?

Original comment by mathieu.malaterre on 11 Jan 2012 at 9:34

@GoogleCodeExporter
Copy link
Author

Original comment by mathieu.malaterre on 25 Feb 2014 at 3:26

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Issue 27 has been merged into this issue.

Original comment by mathieu.malaterre on 26 Feb 2014 at 2:09

@GoogleCodeExporter
Copy link
Author

Closing for now, until new input is given (would need actual dataset BTW).

Original comment by mathieu.malaterre on 26 Feb 2014 at 3:57

  • Changed state: WontFix
  • Added labels: Milestone-Release2.1

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