Installing JAI

Hello
I am new to JAI. I want to convert colored images in RGB to HSI grey scale. For this i need a class in javax.media.jai
but my problem is i installed the JAI API's but i could not find the above classes. Please help me in installing the libraries for my problem.
thanx

you probable haven't set the classpath.
In your IDE go to the project settings and set the classpath to the directory where the JAI is installed.

Similar Messages

  • Problem Installing JAI

    Hi
    I have installed JAI and included the .zip and .jai files in the classpath, but the JAI ImageReaders havn't got registered with ImageIO.
    Without JAI:
    code:
    Iterator<ImageReader> iterator=ImageIO.getImageReadersBySuffix("jpg");
    while(iterator.hasNext()){
    ImageReader reader=iterator.next();
    System.out.println("Reader " + reader.getClass().getName() + "\n" + (reader.readerSupportsThumbnails()?"does ":"doesn't ") + "support thumbnails");
    output:
    Reader com.sun.imageio.plugins.jpeg.JPEGImageReader
    does support thumbnails
    It says it does support thumbnails, but I'm still not able to read any.
    With JAI
    commandline:
    java -classpath jai-1_1_3-lib.zip:jai_codec.jar:jai_core.jar:. classfile
    output:
    Reader com.sun.imageio.plugins.jpeg.JPEGImageReader
    does support thumbnails
    I get the same ImageReader that I had previously! This ImageReader says it can read thumbnails, but it doesn't actually. I want an ImageReader that can read thumbnails, ie. I don't want "com.sun.imageio.plugins.jpeg.JPEGImageReader" but something else.
    Does anyone know how to install JAI properly, I mean does anyone know how to get new pluggin ImageReaders from JAI registered with ImageIO? My images do have thumbnails, I'm just trying to read them.

    The JAI-ImageIO package dosen't have its own JPEG image reader, so you'll still get the com.sun.imageio.plugins.jpeg.JPEGImageReader one. My recomendation for the ImageIO library was only because you said you wanted to support a few more image formats.
    While JAI core does have it's own JPEG "codec", I don't think JAI supports extracting information from an image's metadata. JAI is more about manipulating the core image, not about the finer details of a file's header.
    Lastly, in the code I posted in the previous post I made a fairly significant blunder.
    if (reader.readerSupportsThumbnails()) {
    }That if statement should have a not equals (!) exclamation mark. If you used my code then you probably kept getting "Image format does not support thumnails" when it does.
    So the question then is whether the standard JPEGImageReader correctly reads thumnail data. Here's my story of trying to answer that question:
    I googled for some programs for which I could insert a thumnail in the JPEG's metadata. The programs that came up were really old, but I used one of them. When I tried reading the embeded jpg thumnail from java I got an Exception stating that the thumnail was not a JFIF image. Basically, the first version of JPEG had some shortcommings. What's now used by pretty much everyone and everything is JPEG File Interchange Format or JFIF for short. To remedy the situation I needed a newer program to insert the thumnail.
    After googling some more, I learned that when saving an image as JPEG in Adobe Photoshop that little checkbox called "Preview" will attach a thumnail to the JPEG's metadata. I was able to confirm visually with the older program that this worked (that Adobe Photoshop inserted a thumnail). Going back to java, when I tried to read the thumnail - lo and behold - JPEGImageReader did not see the thumnail . When I look at the source code of JPEGImageReader it looks like it does make an attemp at looking for a thumnail. Obviously, something went wrong though. I don't know whether the JPEGImageReader is picky or it just dosen't see the thumnails, but in either case this is probably a bug. A quick bug search shows there is are several bugs related to JPEGImageReader and thumnails.
    At this point all I can recommend is that if you want to load embeded jpg thumnail data through java you will need to google search for 3rd party jpeg image readers. You won't find a different JPEGImageReader in JAI-ImageIO or JAI.
    As for the classpath thing you're suppose to set it on the Manifest File of your program, not the one that appears in the jdk or jre folder.

  • Auto install JAI?

    Hi,
    Does exist a way to auto install the JAI package on the client machine? maybe with Java web start or something like that..
    I write an applet who use JAI.. when this package is not detected, I want a button who ask to the client if he wants to install JAI. The client can be on a Mac, PC or Unix (Sun/PC).
    Is it possible?
    Thanks
    Patrick

    My applet tag required the JRE 1.4.
    I found the way how to launch the JAI installer if the package it's not found on the computer.
    It works well.. except for Mac, because JAI for mac is availabale in a DMG file from Apple, not from Sun. I dont know how to lauch this file with the Java auto install package system.

  • How to install Jaya plug-in in the Safari in Ipad?

    When I surfing certain web site, specifically financial related website, it unable to open due to W/o Jaya plug-in. Anyone can help me on this?

    Your Macbook runs Mac OSX, while your iPad runs iOS. These are two completely different operating systems, meaning that just because you can do something in one it doesn't necessarily follow that you can do the same in the other (you wouldn't, for example, try to open an app on your Macbook by touching it would you? )
    You can install small Java scripts in the form of bookmarklets (services such as instapaper take advantage of this to provide some sort of integration with mobile Safari), but Java plugins cannot be installed. As for the future, who can say? But I wouldn't hold my breath if I were you...

  • Cant extract and install JAI installation packages

    Hi all
    I am new to JAI and i tried installing the setups i obtained from the page.All the setups are showing same error after extraction saying
    A dialogue box pop ups saying "cant run 16 bit windows program". the content is "cannot find file c:\..\..\..setup.exe or its components ensure path and file names are correct and all libraries are available.
    Please guide me..it is very very urgent..any help is appreciated.
    Regards,
    Aravind

    Internet settings are specific to the network that you are using, so you need to ask your network providor to send their settings direct to your phone. This will come as a message which you enter an activation PIN into and the settings are saved to your phone.

  • Could anyone advise on installing JAI?

    Hello,
    I recently installed the latest version of the JAI, on windows.
    The classes have three .jar's which I added to the classpath:
    jai1.1.2\lib\jai_codec.jar
    jai1.1.2\lib\jai_core.jar
    jai1.1.2\lib\mlibwrapper_jai.jar
    But there is also a .exe checkmmx.exe provided and two .dll files:
    mlib_jai.dll
    mlib_jai_mmx.dll
    Could anyone advise where the .exe and the .dll files should be placed?
    Thank you

    I made sure the installation was the windows version and the version which set the classpath.
    After the installation, I was left with a folder:
    jai-1_1_2_01
    which contains the lib folder, and inside lib was:
    the three jar files I mentioned eailer the .exe and the two dll files.
    I added the three jars to the classpath, but just not sure what to do with the .exe and dll's. If these should be left in the lib folder.
    Thanks

  • Question about installing JAI?

    Hello,
    I installed the JAI, but wondered to use the class with Javac, and Java.
    Do I need to the JAI to my autoexec in windows?
    Thanks

    how about you use a for loop and comare the first
    letter to the last letter. if they match keep
    comparing; if they don't match then it's not a
    palindrome.
    so
    racecar //palindrome
    check to see if the first letter matches the last
    letter. it does so
    incrememnt the first variable and decrement the
    other variable.
    - continue until you have cheked all letters.
    Hope that helpsAnother feature of the new forum, I guess...

  • Installing jai API

    hi,
    my name is amir. I don't know if this is the right forum to ask this question, but I'll be happy if you could answer me anyway.
    for about two weeks I was trying to install the jai API with no success. I downloaded several files but non of them was the right one, every time I had some classes or functions that didn't worked out.
    I'll be glad if you could give me the right file, and maybe even instruction of how to install it couse maybe this is the problem.
    thanks,
    amir

    re,
    yes, I need instruction for the installation.What is your programming environment?
    If you use a IDE like Netbeans you just need to add the jar-file to the library-folder(found
    under Tools->Libraries)
    If you got an other IDE there are simillar library management tools.
    To acces a class of JAI import the classes from:
    javax.media.jai.* etc.
    Clear now?
    Olek

  • Installing JAI in Linux

    i have downloaded the :
    A:Linux amd64
    1.jai-1_1_3-lib-linux-amd64.jar
    2.jai-1_1_3-lib-linux-amd64.tar
    3.jai-1_1_3-lib-linux-amd64-jre
    4.jai-1_1_3-lib-linux-amd64-jdk
    B:Linux i586
    1.jai-1_1_3-lib-linux-i586.jar
    2.jai-1_1_3-lib-linux-i586.tar
    3.jai-1_1_3-lib-linux-i586-jre
    4.jai-1_1_3-lib-linux-i586-jdk
    I referred the followung site :
    http://java.sun.com/products/java-media/jai/INSTALL-1_1_2_01.html
    PLease suggest me how to install the JAI and how to check if that it installed properly .
    Thanks in Advance

    Hi,
    From metalink note 237444.1 :
    Change(s)
    ~~~~~~~~~~
    After fresh installation of Oracle Server 9.2, root.sh is run.
    Cause
    ~~~~~~~
    Legato Single Server Version (LSSV) is not certified on RedHat Advanced
    (Enterprise) Server 2.1 currently.
    Fix
    ~~~~
    Workaround:
    Install following packages from RetHat distribution:
    - ncurses4-5.0-5.i386.rpm
    - pdksh-5.2.14-13.i386.rpm
    After installing those packages the error will not reproduce.
    Nicolas.

  • Installing JAI 1-1-2 586

    When attempting to install JAI1-1--2 586.exe on a 2003 Server Standard Edition SP2 the installer crashes at an apparently random point anywhere from 0 to 80%. JRE 1-4-0-01 is installed already. I have tried installing with the Anti-virus turned off, but no difference. Anybody have any ideas.

    When attempting to install JAI1-1--2 586.exe on a 2003 Server Standard Edition SP2 the installer crashes at an apparently random point anywhere from 0 to 80%. JRE 1-4-0-01 is installed already. I have tried installing with the Anti-virus turned off, but no difference. Anybody have any ideas.

  • JAI install PROBLEM...HELP HELP HELP

    I have jdk 6 update 16 and Im trying to install JAI 1.1.2 or 1.1.3 so I can use it in my programs. When I try to install it [jdk or jre of JAI] then I get a message:
    "The program requires the installation of Java 2 SDK version 1.3. Aborting Setup.". I'm trying to install it on Windows Seven AND on Windows XP but I get the same message on both O.S. Please help. How will I make it install???

    The old build 1.1.2 requires java 2.
    Just download the jdk version 1.1.3 from "https://jai.dev.java.net/binary-builds.html" and you will get it installed.
    I just try it 2 hours before ;)

  • Unable to install ImageIO

    Hi
    I have the JDK 1.6 update 14 installed, and I am trying to install JAI ImageIO 1.1 for TIFF support without success. I have installed both the JRE and JDK versions. In frustration I later also installed the full JAI (JDK and JRE). But the problem is, the JAI jars (ImageIO, Codec, Core) is never installed. The installation seems to go through without a problem, and I can see some dll's being installed. But the three JAI jars are not installed to my JDK or JRE /lib/ext. Also when I do a ImageIO.getWriterFormatNames(), TIFF is not supported.
    Can anyone please help with this?
    Regards
    Alfred

    Happens if you download one of daily builds zip files and manually place the files where they're suppose to be?

  • JAI + JAI Image IO - ImageWrite operation problem: color reversed

    I installed jai 1.1.3 and jai imageio 1.1 on jdk 1.6 and did a test with the following code.
         public static void main(String args[]) {
              Byte[] bandValues = new Byte[3];
              bandValues[0] = (byte)255;
              bandValues[1] = (byte)0;
              bandValues[2] = (byte)0;
              ParameterBlock params = new ParameterBlock();
              params.add((float)300).add((float)200);
              params.add(bandValues);
              PlanarImage bim = JAI.create("constant", params);
              JAI.create("imagewrite", bim, "d:/dev/baseImage.png", "PNG");
              JAI.create("filestore", bim, "d:/dev/baseImage2.png", "PNG");
              PlanarImage pi = JAI.create("imageread", "d:/dev/baseImage.png");
              PlanarImage pi2 = JAI.create("imageread", "d:/dev/baseImage2.png");
              JFrame frame = new JFrame();
              frame.setTitle("Output Image");
              Container contentPane = frame.getContentPane();
              contentPane.setLayout(new GridLayout(1,3));
              contentPane.add(new JScrollPane(new DisplayJAI(bim)));
              contentPane.add(new JScrollPane(new DisplayJAI(pi)));
              contentPane.add(new JScrollPane(new DisplayJAI(pi2)));
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(960, 400);
              frame.setVisible(true);
         }I found that the color in the output file created by "imagewrite" was reversed - bim is red but pi is blue.
    The one created by "filestore" was correct: pi2 was red.
    Did I use the "imagewrite" operation incorrectly? How should I use the imagewrite operation?

    I think you are using it correctly and you've encountered a bug. The same thing occurs on my machine. PlanarImage is using an interlaced raster which stores pixels as BGRBGRBGR ect... But the only way I can see this causing a problem is if the imagewrite operation was going directly to the DataBuffer for the pixels. If it retrieved it through the raster the colors should not be switched.
    Interestingly enough if I do this
    JAI.create("imagewrite", bim.getAsBufferedImage(), "d:/dev/baseImage.png", "PNG");then it works correctly. This suggests even more that the fault is with imagewrite operation interpreting the PlanarImage wrongly.

  • JAI Javadoc + Netbeans

    Hi! Does anybody know which packages to install and how to install JAI (java advanced imaging) documentation on Netbeans?
    The idea is to have the information about the methods while programming on Netbeans, as it happens with standard JAVA.
    Thanks

    I try to install the JAI in NetBeans IDE 6.7.1 putting the zip file http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1-mr-doc.zip in netbeans to Tools -> Java Platforms -> Javadoc (separator) -> Add Zip and it doesn't work :(
    please help!!

  • How to decoding and encoding PNG and GIF images?

    I could decode and encode JPEG images using following create functions which are in com.sun.image.codec.jpeg package.
    JPEGImageDecoder decoder = JPEGCodec          .createJPEGDecoder(inputStream);
    JPEGImageEncoder encoder = JPEGCodec                    .createJPEGEncoder(outputStream);
    But I dont know required package and functions to decode and encode PNG and GIF images. Please help me.

    Is the API that hard to follow?
    ImageIO.read( file/stream/url)
    ImageIO.write( image, format (e.g. PNG, GIF(1), JPEG), file/stream what have you)
    1) Not sure if Java supports GIF saving, it might if you install JAI, or Java 6.

Maybe you are looking for

  • Multi mapping 1 to n files

    Hi, We are trying to develop an scenario with multimapping 1:n, but the issue is that we should save it in different files. Let me explain the scenario a little bit further. XI receives an IDOC of type delvry03. We split the message into several mess

  • Problem displaying characters from pdf file in Preview.app

    Hi, I hope someone can help with this problem. I have some issues with the display of pdf files on OSX. The problems are with ligatures like 'fl' which Preview.app displays incorrectly as 'oeu'. There are other symbols which Preview also displays inc

  • Mailbox Database

    Hello , I have Exchange 2007 with 6 Mailbox Databases I need to run a command to export excel sheet for each database and a list of mailboxes related to this database . I am trying to prepare Migration batch file for Exchange 2013 . thnx MCP MCSA MCS

  • Problem with backup : error 0x8007045D

    Hi guys few days ago i bought ge60 apache,, i was trying to make a backup dvd form the originall windows 7 (home premium) installed o my laptop,, with msi burn recovery but at end of burning the first disk, the verifynig lasted with this error 0x8007

  • Problem with access sequence

    Hi guys, We have a typical problem.  When i verify a condition type 'A' through MM path, MM-->purchasing >conditions->define price determination process -->define condition types,the accesss sequence shown for the condition type is 'X'.  But when i g