如何从 Web 应用程序调用 JMagick

发布于 2024-08-05 00:16:46 字数 356 浏览 2 评论 0原文

我有一个基于 servlet 的应用程序,用于提供存储的文档和图像。图像全部存储为 jpg,其标准尺寸基于系统设计时的企业标准。现在,用户希望看到的图像尺寸已经发生了变化。由于有许多图像不需要调整大小,因此我们构建了一项服务,可以根据附加请求参数动态调整图像大小。然后将保存新文件以供将来请求。

可以使用 java 调整文件大小,但 JMagick 调整大小通常会产生更好看的图像。 JMagick 的问题是必须加载 dll。这适用于可以访问服务器的本地测试,可以更改系统路径以添加包含 dll 的目录。

有没有办法从应用程序中加载 JMagick dll,以便 JMagick 可以在 Websphere 环境中工作?或者是否有其他替代方案可以产生类似质量的图像?

I have a servlet based application for serving stored documents and images. The images were all stored as jpg with standard sizes based on corporate standards at the time the system was designed. Now, the image sizes that users want to see have changed. Since there are many images that won't need to be resized, we have built a service to resize images on the fly based on an additional request parameter. The new file will then be saved for future requests.

The files can be resized using java, but JMagick resizing often produces a better looking image. The problem with JMagick is that a dll has to be loaded. This works for local testing where there is access to the servers the system path can be changed to add the directory containing the dll.

Is there a way to get the JMagick dll loaded from within the application so that JMagick will work within a Websphere environment? or is there another alternative that will produce a comparable quality image?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

巷雨优美回忆 2024-08-12 00:16:46

WebSphere“共享库”工具允许您指定 JMagick 等库的 JAR 的 ClassPath 以及应放置任何 DLL 的 PATH。

共享库可以与服务器或单个应用程序关联。

在 WebSphere 信息中心搜索“管理共享库”以获取更多信息。

The WebSphere "Shared Library" facility allows you to specify the ClassPath to the JARs of a library such as JMagick and a PATH in will any DLLs should be placed.

Shared Libraries can be associated with servers or individual applications.

Search for "managing shared libraries" in the WebSphere Info Center for more inforamtion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文