Page 1 of 1

Bad or unsupported image format message for JPEG2000 image

Posted: Fri Mar 27, 2020 2:49 am
by IntegraHarlan
Hi,
When loading a PDF file that has a JPEG2000 image, i see a red box that contains the following text: Bad or unsupported image format.
JPEG2000 codec (Vintasoft.Imaging.Jpeg2000Codec.dll) is not found.

I do have the Vintasoft.Imaging.Jpeg2000Codec.dll referenced in my project. and the file is being copied to my bin folder.
If I add the following line of code: using (Jpeg2000Decoder decoder = new Jpeg2000Decoder()) { }
(As in the DemosTools class of the PdfEditorDemo solution) I do not see the image or the message. It is blank where the image should be.
Is there some property that I need to set to make this work?

I am using the Winforms .net plugin

Thanks
Harlan

Re: Bad or unsupported image format message for JPEG2000 image

Posted: Fri Mar 27, 2020 12:32 pm
by Alex
Hi Harlan,
When loading a PDF file that has a JPEG2000 image, i see a red box that contains the following text: Bad or unsupported image format.
JPEG2000 codec (Vintasoft.Imaging.Jpeg2000Codec.dll) is not found.
You have the problem because SDK has not found JPEG2000 decoder for decoding PDF image-resource, which is compressed with JPEG2000 compression.

I do have the Vintasoft.Imaging.Jpeg2000Codec.dll referenced in my project. and the file is being copied to my bin folder.
SDK dynamically loads JPEG2000 decoder from Vintasoft.Imaging.Jpeg2000Codec.dll if Vintasoft.Imaging.Jpeg2000Codec.dll file is found in the application executing (Bin) folder. I think the Vintasoft.Imaging.Jpeg2000Codec.dll file is not copied to the Bin folder. Please check this.

If I add the following line of code: using (Jpeg2000Decoder decoder = new Jpeg2000Decoder()) { } (As in the DemosTools class of the PdfEditorDemo solution) I do not see the image or the message.
In this case you are creating static reference to the Vintasoft.Imaging.Jpeg2000Codec.dll file and MSBUILD copies Vintasoft.Imaging.Jpeg2000Codec.dll file into Bin folder.

Best regards, Alexander

Re: Bad or unsupported image format message for JPEG2000 image

Posted: Fri Mar 27, 2020 6:36 pm
by IntegraHarlan
Hi Alexander,
It sounds like when I added the code to create a static reference, the dll is copied to my build folder, which is good.
However, do you know why the JPeg2000 image is not shown on the PDF file when it is loaded in the viewer?
I know the image is there because, I can see it when I open the pdf file in a different pdf viewer.
It sounds like as long as I have the dll referenced and it is being copied to my bin folder the image should show.
However it is not showing. Any ideas why the image is not showing?

Thanks
Harlan

Re: Bad or unsupported image format message for JPEG2000 image

Posted: Sat Mar 28, 2020 8:18 am
by Alex
Hi Harlan,
Any ideas why the image is not showing?
SDK does not render PDF image-resource with JPEG2000 compression because SDK cannot find JPEG2000 codec, i.e. SDK has not found Vintasoft.Imaging.Jpeg2000Codec.dll. Please make sure that Vintasoft.Imaging.Jpeg2000Codec.dll file is located in directory with your application.

Best regards, Alexander

Re: Bad or unsupported image format message for JPEG2000 image

Posted: Mon Mar 30, 2020 6:32 pm
by IntegraHarlan
Hi Alex,
As I stated, the Vintasoft.Imaging.Jpeg2000Codec.dll is copied to my bin folder with my application.
However the image is still not showing when I load the Dll. I think that it is finding the dll, because, It does not show the red box with the Bad or unsupported image format message.
Is there some other configuration that needs to be done?

Thanks
Harlan

Re: Bad or unsupported image format message for JPEG2000 image

Posted: Tue Mar 31, 2020 12:59 pm
by Alex
Hi Harlan,

Please send us (to support@vintasoft.com) a small project, which allows to reproduce the problem. We need to reproduce the problem on our side.

Best regards, Alexander

Re: Bad or unsupported image format message for JPEG2000 image

Posted: Tue Mar 31, 2020 8:35 pm
by IntegraHarlan
Hi Alexander,
I found out what the problem was with the JPEG2000 image. It turns out that the JPEG2000 license code had not been updated.
Now that it is updated, Image is being displayed.

Thanks
Harlan.