适用于 64 位 Windows 的 JAI 和 ImageIO

发布于 2024-10-20 18:17:01 字数 221 浏览 2 评论 0原文

我搜索了 64 位 Windows 的 JAI 和 ImageIO 库,但没有找到这些版本的任何版本。 最后一次对 Java Bug 跟踪系统的 64 位 win 版本请求是在 6-7 年前。

我认为,jai的开发者不会发布任何针对win64的版本。 :(

我的问题是,我们可以从 64 位 Windows 的源代码构建 jai 和 imageio,可能吗?如何?

非常感谢...

i searched JAI and ImageIO library for 64 bit windows, but i didn't find any version of these.
Last 64 bit win vesion request on Java Bug tracking system 6-7 years ago.

I think, jai's developers will not release any version for win64. :(

My question is, can we build jai and imageio from their source for 64bit windows, is it possible? How?

thanks a lot...

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

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

发布评论

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

评论(3

满地尘埃落定 2024-10-27 18:17:01

JAI 和 JAI Image I/O 从源语言的角度来看有两个部分:java 和 C/C++。 java部分是免费的(就像免费啤酒一样),你可以从java.net下载和编译,但这是java源代码,无论架构如何(x86,x64)。

SUN 未发布 C/C++ 源代码,因此您只能获得适用于 Win32 和其他平台的编译后的 .dll。这个源代码没有发布有几个原因,一是SUN使用来自第三方的源代码并且有权使用它,而不是(自由地)重新分发它。

三年前,我们就 JAI Image I/O JPEG 12 位编解码器中存在的几个错误联系了 SUN,他们提供了一些选项。如果这些bug对我们来说很紧急,我们可以提供C/C++程序员来解决它们,如果我们签署NDA(保密协议),SUN可以向我们提供codecLib的源代码。另一种选择是等待SUN 解决问题。我们为负责处理这些错误的 SUN 工程师提供了帮助,他在不到一周的时间里就解决了问题。

现在情况似乎有所不同,因为 JAI 和相关项目(图像 I/O)似乎不再活跃,即没有人在研究它们(新版本、错误修复)。

因此,如果您需要新版本,您最终会遇到 JAI 的很多问题。

您可以使用 32 位 JRE 来执行在 64 位操作系统(如 Windows 7 x64)中使用 JAI 的程序。

不幸的是,您无法在 64 位 JRE 中使用 JAI 或 Image I/O,因为您只能使用纯 Java 中提供的功能,并且丢失了 Image I/O 中的大多数编解码器。

另一个问题是您真正需要 JAI 提供什么。 JAI可以使用100%纯Java实现(软件版本),速度较慢但解决了x64的问题。 JAI Image I/O 还具有一些可以通过 100% 纯 Java 实现的功能,但其中大多数(如编解码器)需要本机 dll(如 codedLib)。

JAI and JAI Image I/O have two parts from source language points of view, java and C/C++. The java part is free (as free beer) and you can download and compile from java.net, but this is java source, no matter architecture (x86, x64).

The C/C++ source code is not released by SUN so you only get the compiled .dll for Win32 and others platforms. This source code is not released due to several reasons, one is SUN uses source from third parties and have the right to use it, not to (freely) redistribute it.

We contact SUN three years ago for several bugs present in JAI Image I/O JPEG 12bit codec and they give some options. If these bugs are urgent for us, we can provide C/C++ programmers for solving them, by SUN providing us the source code of codecLib if we sign a NDA (Non Disclosure Agreement). The other option was wait for SUN to solve the problems. We provide assistance to the SUN engineer assigned to the bugs and he solved in less than a week.

Now the situation seems to be different, as JAI and related projects (Image I/O) seems to be no longer active, i.e. nobody is working on them (new releases, bug fixes).

So you eventually will have lot of problems with JAI if you require new versions.

You can use the 32bit JRE to execute programs that use JAI in 64bit OS like Windows 7 x64.

Unfortunately you can't use JAI or Image I/O in a 64bit JRE, as you only can use the functionality available in pure Java and lost most codecs in Image I/O.

Another question is what you really need from JAI. JAI can be used using the 100% pure Java implementation (software version), slower but solves the problems of x64. JAI Image I/O also have some functionality that can be implemented by 100% pure Java but most of them, like codecs, require native dll like codedLib.

友谊不毕业 2024-10-27 18:17:01

正在尝试在 Windows 7 上使用其本机 MediaLib Windows DLL 检查 32 位 Java 的生产力。它显示比单独的 64 位纯 Java 代码稍微慢一些 (5-10%)。

我使用中值滤波对相当大的 1 位黑白图像(大小为 9000 x 2500 像素)测试了 JAI。使用中值滤波器 7 x 7 时,处理 32 位本机 Windows 库 (DLL) 需要 17 秒,处理不带 DLL 的纯 64 位 Java 需要 15 秒。测试重复 3-4 次,计时结果非常相似。

32 位 Java + 本机 MediaLib 的调试输出:

Raster path is "F:\Projects\Fadeev\listv.bmp"
Median size value set to 7
Output file will be saved to input directory
Data color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Color distance set to default value 20,00
New color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Image ( 9000 x 2461 ) read in 00:00:00.038
Image color quantized at 00:00:01.400
**Image filtered by () at 00:00:17.531** (MediaLib works now and here!!!)
Image stored at 00:00:00.356 (storing in PNG!)
Total time is 00:00:19.325

64 位纯 Java 的调试输出:

Raster path is "F:\Projects\Fadeev\listv.bmp"
Median size value set to 7
Output file will be saved to input directory
Data color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Color distance set to default value 20,00
New color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Image ( 9000 x 2461 ) read in 00:00:00.038
Image color quantized at 00:00:00.910
Error: Could not load mediaLib accelerator wrapper classes. Continuing in pure Java mode.
Occurs in: com.sun.media.jai.mlib.MediaLibAccessor   com.sun.media.jai.mlib.MediaLibLoadException
**Image filtered by () at 00:00:13.802**
Image stored at 00:00:00.414
Total time is 00:00:15.164

Was trying to check productivity of 32-bit Java with its native MediaLib Windows DLL on Windows 7. It shows to be slightly slower (5-10 %) that 64-bit pure Java code alone.

I tested JAI with median filtering for rather big 1-bit b/w image (size of 9000 x 2500 pixels). With median filter 7 x 7 it costs 17 seconds to processs with 32-bit native Windows libs (DLLs) and 15 seconds with pure 64-bit Java without DLLs. Test was repeated 3-4 times with very similar timing results.

Debug output for 32-bit Java + native MediaLib:

Raster path is "F:\Projects\Fadeev\listv.bmp"
Median size value set to 7
Output file will be saved to input directory
Data color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Color distance set to default value 20,00
New color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Image ( 9000 x 2461 ) read in 00:00:00.038
Image color quantized at 00:00:01.400
**Image filtered by () at 00:00:17.531** (MediaLib works now and here!!!)
Image stored at 00:00:00.356 (storing in PNG!)
Total time is 00:00:19.325

Debug output for 64-bit pure Java:

Raster path is "F:\Projects\Fadeev\listv.bmp"
Median size value set to 7
Output file will be saved to input directory
Data color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Color distance set to default value 20,00
New color set to default value java.awt.Color[r=255,g=0,b=0] (RED)
Image ( 9000 x 2461 ) read in 00:00:00.038
Image color quantized at 00:00:00.910
Error: Could not load mediaLib accelerator wrapper classes. Continuing in pure Java mode.
Occurs in: com.sun.media.jai.mlib.MediaLibAccessor   com.sun.media.jai.mlib.MediaLibLoadException
**Image filtered by () at 00:00:13.802**
Image stored at 00:00:00.414
Total time is 00:00:15.164
晒暮凉 2024-10-27 18:17:01

抱歉,在 jai/imageio 代码存储库中不存在任何适用于 win64 的代码。

http://java.net/projects/jai -core/sources/svn/show/trunk/src/share/mediaLib

http://java.net/projects/jai-imageio-core/sources/svn/show/trunk/src/share/jclib4jai

但它确实存在一个问题在 jai/imageio 错误跟踪系统中。

http://java.net/jira/browse/JAI_IMAGEIO_CORE-62

抱歉。

Sorry, but in the jai/imageio code repository it does not exist any code for win64.

http://java.net/projects/jai-core/sources/svn/show/trunk/src/share/mediaLib

http://java.net/projects/jai-imageio-core/sources/svn/show/trunk/src/share/jclib4jai

But it does exist a issues in the jai/imageio bug tracking system.

http://java.net/jira/browse/JAI_IMAGEIO_CORE-62

Sorry for that.

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