javaxsltimage-conversionjpeg2000oracle-soa

How to detect and convert JPEG2000 to JPEG, BMP or PNG using XSLT?


Working with Oracle SOA Suite 12c, XSLT, and Java embeddings.

I am receiving images that I am converting into Base64 and sending on for further processing. However, When I get JPEG2000 images, the receiving end of the processing doesn't function. In my middleware, I want to convert the JPEG2000 to JPEG, BMP, or PNG. If I can do that everything should work fine. For this I need to do 2 things:

1: Detect whenever an image is in JPEG2000.

2: Convert the JPEG2000 image to the required format

Does someone know how to tackle these issues?


Solution

  • Detecting the format of an image is just about possible in XSLT if you are able to use a processor that supports the EXPath Binary Module (a function library for handling binary data). Converting between image formats, however, will require calling out to an image processing library such as imagemagick.