如何使用XSLT检测并将JPEG2000转换为JPEG、BMP或PNG?

huangapple go评论77阅读模式
英文:

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

问题

在使用Oracle SOA Suite 12c、XSLT和Java嵌入时。

我收到要转换为Base64并进行进一步处理的图像。然而,当我收到JPEG2000图像时,处理的接收端无法正常工作。在我的中间件中,我希望将JPEG2000转换为JPEG、BMP或PNG。如果我能做到这一点,一切都应该正常工作。
为此,我需要做两件事情:

1:检测图像是否为JPEG2000格式。

2:将JPEG2000图像转换为所需的格式。

有人知道如何解决这些问题吗?

英文:

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?

答案1

得分: 1

检测图像的格式在XSLT中是可能的,只要您能够使用支持EXPath Binary模块(用于处理二进制数据的函数库)的处理器。然而,要在不同的图像格式之间进行转换,就需要调用图像处理库,比如ImageMagick。

英文:

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.

huangapple
  • 本文由 发表于 2020年9月24日 15:58:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/64041938.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定