Possible bug when using JPEG2000 and MRC compression

Discussions about PDF management.
Post Reply
accudave
Posts: 16
Joined: Tue May 12, 2015 6:07 pm

Possible bug when using JPEG2000 and MRC compression

Post by accudave » Thu Jan 26, 2017 5:55 pm

I won't be able to share example documents because the ones we are provided that can replicate the bug have sensitive customer data them, but we found that on some TIF documents (LZW compressed), converting them to PDF with JPEG2000 and MRC compression results in a GenericError returned by GdPicturePDF.AddImageFromGdPictureImage on certain pages of the TIF document. Some pages it works fine.

Here is how we have our conversion configured in code.

Code: Select all

p.NewPDF();
p.SetCompressionForColorImage(PdfCompression.PdfCompressionJPEG2000);
p.SetCompressionForBitonalImage(PdfCompression.PdfCompressionJBIG2);
p.SetJpegQuality(100);
p.EnableCompression(true);
And our call to add the page.

Code: Select all

p.AddImageFromGdPictureImage(pageId, PdfAdvancedImageCompression.PdfAdvancedImageCompressionMRC);
I tested this with versions 12.0.50-56 and all of them give the same error. For now we are switching to Flate compression with MRC which does not have this issue. We could have also switched to JPEG2000 and Color Detection instead which does not have the issue, but wanted to stick with MRC since the resulting file size is lower. I am thinking this is a bug because our code has successfully converted millions of TIF documents of various kinds to PDF, but we are seeing this in some circumstances.

User avatar
Loïc
Site Admin
Posts: 5651
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Possible bug when using JPEG2000 and MRC compression

Post by Loïc » Tue Feb 07, 2017 4:21 pm

Hello,

Unfortunately there is nothing we can do if we can not replicate the problem from our end.

Please try to share a document and a code snippet with our team that you can reach through the helpdesk: https://support.gdpicture.com

Kind regards,

Loïc

Gabriela
Posts: 278
Joined: Wed Nov 22, 2017 9:52 am

Re: Possible bug when using JPEG2000 and MRC compression

Post by Gabriela » Thu Jan 31, 2019 5:34 pm

Hello,

Maybe you can try quite new ReplaceImageMRC() method:
http://guides.gdpicture.com/content/web ... geMRC.html
Kind regards,

Gabriela
GdPicture Team

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests