Bad or unsupported image format message for JPEG2000 image

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Moderator: Alex

Post Reply
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Bad or unsupported image format message for JPEG2000 image

Post 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
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Bad or unsupported image format message for JPEG2000 image

Post 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
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Re: Bad or unsupported image format message for JPEG2000 image

Post 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
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Bad or unsupported image format message for JPEG2000 image

Post 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
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Re: Bad or unsupported image format message for JPEG2000 image

Post 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
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Bad or unsupported image format message for JPEG2000 image

Post 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
IntegraHarlan
Posts: 84
Joined: Fri Jan 24, 2020 3:37 am

Re: Bad or unsupported image format message for JPEG2000 image

Post 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.
Post Reply