Bug 695768 - Luratech JPEG 2000 encoder isn't handling License Number correctly
Summary: Luratech JPEG 2000 encoder isn't handling License Number correctly
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: JPX/JBIG2 encode/decode (show other bugs)
Version: 9.15
Hardware: PC Windows 8
: P4 normal
Assignee: Marcos H. Woehrmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-02 13:36 UTC by Rodrigo Terra
Modified: 2016-01-27 00:37 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Terra 2015-01-02 13:36:24 UTC
In file base\sjpx_luratech.c in line 879 gs 9.15 JP2_Decompress_SetLicense should really be JP2_Compress_SetLicense because is inside s_jpxe_init, encoder init not decoder init.

Lines 877-885:


#if defined(JP2_LICENSE_NUM_1) && defined(JP2_LICENSE_NUM_2)
    /* set license keys if appropriate */
    err = JP2_Decompress_SetLicense(state->handle,
        JP2_LICENSE_NUM_1, JP2_LICENSE_NUM_2);
    if (err != cJP2_Error_OK) {
        dmlprintf1(state->memory, "Luratech JP2 error %d setting license\n", (int)err);
        return ERRC;
    }
#endif

As a result of current implementation is not possible encode using luratech we always receive -4 error setting license back.
On the other hand apply it single fix everything works fine.
Comment 1 Henry Stiles 2015-01-13 08:39:58 UTC
Thanks for the bug report we'll have a look.  Please be careful how you are using the code.  It sounds like you are using AGPL ghostscript linked with proprietary Luratech code.  There are important legal issue to consider when distributing programs with mixed licenses.  We do have a commercial license for ghostscript, you can find out more here: http://www.artifex.com/page/licensing-information.html.
Comment 2 Rodrigo Terra 2015-01-13 10:19:46 UTC
(In reply to Henry Stiles from comment #1)
> Thanks for the bug report we'll have a look.  Please be careful how you are
> using the code.  It sounds like you are using AGPL ghostscript linked with
> proprietary Luratech code.  There are important legal issue to consider when
> distributing programs with mixed licenses.  We do have a commercial license
> for ghostscript, you can find out more here:
> http://www.artifex.com/page/licensing-information.html.

Thank you very much for the advice, actually write now we are still just test to see if according with our needs there is a good trade-off in use ghostscript with luratech filters for jpeg2000 or even use just ghostscript without support to JPXEncode. It is a in-house use only and current we use Acrobat Distiller, you can be sure that if we decide that GS+Luratech it is the path to take instead Acrobat Distiller we will to a proper license as we do with Distiller. Unfortunately though so far we found some others features missing in ghostscript like ActualText support and I'm afraid that we will not use at all Luratech and possible not even ghostscript, sorry. But again thank you very for help us to keep it in mind for sure it is a vital point of concern for us too.
Comment 3 Marcos H. Woehrmann 2015-11-26 20:15:20 UTC
Fixed in 5596cc435aec8387ddd2e64437f1f9486f3ee5c6.  Thanks to Rodrigo Terraa for finding this.