Reputation: 460
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...
Upvotes: 20
Views: 15623
Reputation: 35
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
Upvotes: 2
Reputation: 2725
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.
Upvotes: 29
Reputation: 687
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.
Upvotes: 0