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
gcode-importer opened this issue Aug 30, 2011 · 7 comments
Closed

pclr-cmap-cdef #82

gcode-importer opened this issue Aug 30, 2011 · 7 comments
Assignees
Milestone

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 82

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


Reported by szukw000 on 2011-08-30 02:23:58


- _Attachment: [OpenJPEG-1.4.0-revision-898-pclr-cmap-cdef.dif.gz](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-82/comment-0/OpenJPEG-1.4.0-revision-898-pclr-cmap-cdef.dif.gz)_
@gcode-importer
Copy link
Author

Antonin, the above patch is incomplete. 

Do NOT use it.

The change in 'openjpeg.c' is missing.

New patch follows.

winfried

Reported by szukw000 on 2011-08-30 11:22:00

@gcode-importer
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

Reported by szukw000 on 2011-08-30 13:56:31


- _Attachment: [OpenJPEG-1.4.0-revision-898-3-pclr-cmap-cdef.dif.gz](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-82/comment-2/OpenJPEG-1.4.0-revision-898-3-pclr-cmap-cdef.dif.gz)_

@gcode-importer
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;
    }
 }

Reported by szukw000 on 2011-08-30 14:17:09

@gcode-importer
Copy link
Author

What is the status of this patch ?

Reported by malaterre on 2012-01-11 09:34:00

@gcode-importer
Copy link
Author

Reported by malaterre on 2014-02-25 15:26:52

  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

@gcode-importer
Copy link
Author

Issue 27 has been merged into this issue.

Reported by malaterre on 2014-02-26 14:09:37

@gcode-importer
Copy link
Author

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

Reported by malaterre on 2014-02-26 15:57:32

  • Status changed: WontFix
  • Labels added: 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

3 participants