Replace Image with JPG2000 image

Hi,



I want to use the Replace method of the PdfContentEditor class as in the example:

Aspose.Total for .NET|Documentation



When using .jpg file it works ok. But I want to use JPG2000 because of the higher compression level. If I replace an image with an .jp2 file it generates the following exception:



Unsupported image format: file:///c:/temp/test.jp2: v4.1.0.0



When I rename the .jp2 file to .jpg it still generates the same error. It seems there’s some check of the header preventing the use of JPG2000.



Is there a workaround? Can this format be added to the supported formats?



Thanks in advance for your reply.











Hi Peter,

Can you please share the input PDF file along with JP2 image file? We’ll have to test the issue at our end. You’ll be updated with the results the earliest possible.

We’re sorry for the inconvenience.
Regards,

Hi,



I’m sorry. The documents I’m working on are confidential. But you can use any .jp2 file. For instance a JPG saved as JPG2000 with Irfanview if you like. That will produce the same error.



regards,

Hi Peter,

I have reproduced this problem at my end and logged it as PDFKITNET-15173 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once the issue is resolved.

We’re sorry for the inconvenience.
Regards,