Finding a Gif Encoder for Java Advanced Imaging (JAI)

I'm trying to find the GIF encoder for Java Advanced Imaging. I keep reading all over the place that there is one, but for the life of me I can't figure out where it is supposed to be. Could anyone please enlighten me?
Thanks

After I installed this, it still doesn't report gif as a possible encoding type:
String[] codecs = ImageCodec.getEncoderNames(img, null);
            for (int j = 0; j < codecs.length; j++) {
                String codec = codecs[j];
                System.out.println (codec);
            }only reports the following types available:
pnm
jpeg
tiff
png
bmp

Similar Messages

  • Download for Java Advanced Imaging Image I/O Tools 1.0 not working

    Hey there,
    Anyone able to get the JAI I/O package from Sun, whenever I go to download it from
    http://java.sun.com/products/java-media/jai/downloads/download-iio.html
    I get a "FATAL Exception".
    If anyone has a copy of the I/O package and can share it please let me know. I have downloaded the regular JAI API but I do not believe this adds TIFF support.

    I read somewhere (perhaps in the imageio-interest maillist) that
    the native libraries only apply to JPEG and that they aren't strictly
    necessary unless you want the accompanying performance boost. So I've
    been using just the JAR files and NOT the native dll:
    clibwrapper_jiio.jar
    jai_imageio.jar
    mlibwrapper_jai.jar
    But NOT: clib_jiio.dll
    This has worked fine for my application and my applet. I have been using the BMP and TIFF readers with no problem. However, when I bundle these
    JAR files into my Java Web Start application, those readers aren't found. I see the JAR files get loaded and validated (I had to sign each of these JAR files -- could that be a problem?) but my JavaWS application can't read TIFF or BMP. Any ideas?
    Could someone confirm that the JAR files ARE usable without the native
    libraries? Also, in that case, does one need ALL the JAR files?

  • Using Java Advanced Imaging (JAI) in Applet

    I'm trying to port a JAI user interface to an applet using Apache Tomcat. When I try to display an image in the applet I get an exception and I have no idea what the cause is. I've opened up security completely (temporarily) to ensure that I'm not getting an error due to an applet security issue. Consequently, I'm able to browse/open files from the client.
    Here is the stack for the error I'm getting. Can anyone tell me what is causing this error? Thanks.
    Java(TM) Plug-in: Version 1.4.1_01
    Using JRE version 1.4.1_01 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Administrator
    Proxy Configuration: No proxy
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at javax.media.jai.FactoryCache.invoke(FactoryCache.java:130)
         at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1669)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:481)
         at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:340)
         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:805)
         at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:853)
         at javax.media.jai.RenderedOp.getWidth(RenderedOp.java:2135)
         at com.abi.protmodule.GelDisplayData.getGelImage(GelDisplayData.java:558)
         at com.abi.protmodule.ScrollingGelPanel.<init>(ScrollingGelPanel.java:58)
         at com.abi.ris.web.applet.GelEditPanel.showGelImage(GelEditPanel.java:76)
         at com.abi.ris.web.applet.GelEditApplet.openGelJButton_actionPerformed(GelEditApplet.java:159)
         at com.abi.ris.web.applet.GelEditApplet.chooseFileJButton_actionPerformed(GelEditApplet.java:136)
         at com.abi.ris.web.applet.GelEditApplet$1.actionPerformed(GelEditApplet.java:73)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
         at java.awt.Component.processMouseEvent(Component.java:5093)
         at java.awt.Component.processEvent(Component.java:4890)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3598)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
         at java.awt.Container.dispatchEventImpl(Container.java:1609)
         at java.awt.Component.dispatchEvent(Component.java:3439)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Caused by: java.lang.NoSuchFieldError: borders
         at com.sun.medialib.mlib.Image.initIDs(Native Method)
         at com.sun.medialib.mlib.Image.<clinit>(Image.java:2903)
         at com.sun.media.jai.mlib.MediaLibAccessor$1.run(MediaLibAccessor.java:223)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.media.jai.mlib.MediaLibAccessor.setUseMlib(MediaLibAccessor.java:220)
         at com.sun.media.jai.mlib.MediaLibAccessor.useMlib(MediaLibAccessor.java:185)
         at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:391)
         at com.sun.media.jai.mlib.MediaLibAccessor.isMediaLibCompatible(MediaLibAccessor.java:314)
         at com.sun.media.jai.mlib.MlibScaleRIF.create(MlibScaleRIF.java:82)
         ... 39 more
    Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.

    look at
    http://forum.java.sun.com/thread.jsp?thread=290960&forum=20&message=1261471
    and
    http://forum.java.sun.com/thread.jsp?forum=20&thread=173410
    It's something related with DLL libraries...

  • What's the latest stable version of Java Advanced Imaging Image I/O Tools?

    Hi,
    Could anybody tell me what's the latest stable version for Java Advanced Imaging Image I/O Tools and from where I can download the same?
    Thanks

    Just 'mark out of date' the package. Or email him directly. The forums are generally the WORST way to try and contact any specific developer.
    Oh, and before that, please do a quick google....
    http://projects.gnome.org/gedit/
    Closing.

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

  • JAI (Java Advanced Imaging) and CF8

    Hi
    I'm using the Java Advanced Imaging API since CF6 and made
    several jar files to manipulate images (as it wasn't integrated in
    CF).
    Today I installed CF8, put the "jai_core.jar" and
    "jai_codec.jar" in the "cfroot\runtime\jre\lib\ext" folder as I did
    when I first developped my application or when I migrated from CF6
    to CF7 but today it does not work.
    I have the following error (see attached), ImageInfo and
    GetTaille are my own jar classe and method.
    I saw that there is already a "jai_core.jar/jai_codec.jar" in
    "cfroot\lib" So I think that there is a conflict between the two
    JAI's. I removed mine, but I have another error : "An exception
    occurred when instantiating a Java object. The class must not be an
    interface or an abstract class. Error:
    com/sun/media/jai/codec/ImageEncodeParam."
    I also tried to replace the JAI of CF8 by mine (just for a
    test) but I have the same error.
    Do you have any idea of a solution ?
    I know I can now use the CF8 tags to manipulate images, but I
    have to rewrite lots of code and I think there is still
    manipulations that CF8 can't handle (CMYK images, ICC profiles,
    Thanks in advance for your suggestions

    > "An exception occurred when instantiating a Java object.
    The class must not
    > be an interface or an abstract class. Error:
    I don't know how you're using
    com/sun/media/jai/codec/ImageEncodeParam in your code but the error
    is clear. ImageEncodeParam is an interface in the CF8
    jai_codec.jar. You can instantiate a concrete class, but not an
    interface. Possibly the private classes have changed since you
    first wrote the jar?
    > I think that there is a conflict between the two JAI's.
    >...
    > Caused by: java.lang.SecurityException: sealing
    violation: package
    > com.sun.media.jai.util is sealed
    You could be right. If the jars are sealed having two of them
    in the classpath might cause that kind of error.

  • Saving a Gif image using JAI (Java Advanced Imaging)

    I'm trying to read in and save out a bunch of gif images in JAI. I'm reading them in, resizing them, and then saving them back out, all in gif format.
    For some reason some of my gif images work fine, and some don't throw any errors, but save as 0k size.
    When I do img.getColorModel().toString(); I get the following output for images that do work:
    IndexColorModel: #pixelBits = 8 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@1bbf1ca transparency = 1 transIndex = -1 has alpha = false isAlphaPre = false
    And the following output for images that don't work:
    ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@1bbf1ca transparency = 1 has alpha = false isAlphaPre = false
    If I try to save the images that don't work out as jpg's they work fine, but if I try to save them out as gif's, I get 0k files.
    Any insight on how to correct this problem?
    I assume it has something to do with the 24 numComponents in the non-working gifs, but I'm really not sure.
    Please help.
    Thanks.

    Can you post your image property?
    Try using this for image compression:
    int pixelSize = img.getColorModel().getPixelSize();
    if (1 == pixelSize) {
    tiffEncodeParam.setCompression(TIFFEncodeParam.COMPRESSION_GROUP3_2D);
    } else if (8 == pixelSize) {
    tiffEncodeParam.setCompression(TIFFEncodeParam.COMPRESSION_DEFLATE);
    } else if (24 == pixelSize) {
    tiffEncodeParam.setCompression(TIFFEncodeParam.COMPRESSION_JPEG_TTN2);
    Thanks,

  • Jave Advanced Imaging

    Dear all,
    I am writing a servlet which can resize and display an image. firstly, it retrieves byte[] data as an image, then if the image size is too big, the image will be resize to a propotional size, say 85% of the original size. but I cannot find any decoder for .gif images.
    Byte[] byteImage = (byte[]) img; // img is an image body and stored in database
    ByteArrayInputStream inStream = new ByteArrayInputStream(byteImage);
    JPEGEncodeParam encodeParam = new JPEGEncodeParam();
    ImageDecoder decoder = ImageCodec.createImageDecoder("JPEG", inStream, encodeParam);
    JPEGEncodeParam can be used to encode a .jpg image byte[] file with ByteArrayInputStream. However, It cannot serve a .gif image byte[] file. Can somebody help?
    Cos

    Thanks first.
    however, i found that Acme.JPM.Encoders.GifEncoder is easier to use.
    but i got another problem:
    when the quality of a JPEG image is not good, when the scale is processed, the color of the image will be discarded or too compressed. what should i do?
    byte[] btImg = image btye[] from database;
    ByteArraySeekableStream inStream = new ByteArraySeekableStream(btImg);
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
    RenderedImage imgSrc = JAI.create("stream", inStream);
    ParameterBlock pb = new ParameterBlock();
    // Scale
    pb = new ParameterBlock();
    pb.addSource(imgSrc);
    pb.add(1.50F);
    pb.add(1.50F);
    pb.add(0.0F);
    pb.add(0.0F);
    pb.add(new InterpolationBicubic(1));
    RenderedImage imgRen = (RenderedImage) JAI.create("scale", pb, null);
    JPEGEncodeParam encodeParam = new JPEGEncodeParam();
    ImageEncoder encoder = ImageCodec.createImageEncoder("JPEG", outStream, encodeParam);
    encoder.encode(imgRen);
    //output scaled byte[]
    byte[] btImage = outStream.toByteArray();
    can anyone help?
    otto

  • JAI(Java Advanced Imaging) Problem with splitting TIFF images

    Hi
    I am getting problem with height when I use this program to split TIFF images
    ImageDecoder decImage = ImageCodec.createImageDecoder("tiff", inStr,
    null);
    Then it creates RenderedImage page by page and encodes them to file:
    String outFileName = "";
    OutputStream outStr;
    TIFFEncodeParam encParam = new TIFFEncodeParam();
    encParam.setCompression(TIFFEncodeParam.COMPRESSION_PACKBITS);
    for (int i=0,n=this.getPageCount(); i < n; i++)
    outImage = this.decImage.decodeAsRenderedImage(i);
    outFileName = "C:\\Temp\\Split" + i + ".tif";
    outStr = new FileOutputStream(outFileName);
    BufferedOutputStream bOutStr = new BufferedOutputStream(outStr);
    encImage = ImageCodec.createImageEncoder("tiff",bOutStr,encParam);
    encImage.encode(outImage);
    bOutStr.flush();
    bOutStr.close();
    }The images are shrinking when I split . I need a solution to this problem.
    Thanks for any help in advance
    Sudheer.

    Hi
    Did you get a solution for your problem. I am also trying to split a TIFF file.
    Thanks in advance
    Antony

  • Best Audio Encoder for Java???

    In my program, I can only play .au files in Java.. I have a few .wavs that I would like to incorporate into my program, but I need to change them into .au . Ive tried using COOL EDIT PRO 2 and SOUND FORGE 6.0 to open up the .wavs, then save them as .au .. I run my Java program, but an error comes up saying INVALID ENCODING and INVALID FILE TYPE.. Does anyone have a solution for this frustrating problem I have? It's very urgent and I need your help, thanks...

    It took me 4 clicks and 12 keystrokes to find this.
    http://java.sun.com/docs/books/tutorial/sound/problems.html
    I clicked Tutorials
    I clicked The Java Tutorial
    I clicked in the Tutorial Search textField
    I typed sound files <enter>
    The first one looked good to me, click!
    Live and learn,
    Radish21

  • Tutorial/HowTo for Java JFrame image map

    I am a first semester Java student and am required to program a very simple game. I want to paint a Super Mario theme using 30x30 pixel blocks. I have been going through tutorials for a few days on displaying gif/jpg/png within a jframe and all use different methods. Does anyone know of a tutorial that focuses on building a jframe that is filled by a 2d array, each array element being a png?
    I am new to JFrames having spent most my time with console/text only programming.

    Welcome to the Sun forums.
    atozer wrote:
    I am a first semester Java student and am required to program a very simple game. A 'very simple' game would be console based. Perhaps 'hangman' would fit the bill.
    .. I want to paint a Super Mario theme using 30x30 pixel blocks. Huhh.. What does 'theme' mean to you? Searching for 'Super Mario theme' all I could see was hits for the theme music. I take it this would be better described in a screen-shot. Do you have a link to one?
    ..I have been going through tutorials for a few days on displaying gif/jpg/png within a jframe and all use different methods. Does anyone know of a tutorial that focuses on building a jframe that is filled by a 2d array, each array element being a png?1) It is generally not a good idea to consider a root component such as a JFrame, JApplet, JWindow or JDialog to be the 'main area' of the GUI. Instead it is more common/useful to put the main GUI into a JPanel, which can then be put into any of the root level components as needed.
    2) I suspect your tutorial requirements are too specific for any single tutorial. Instead look to tutorials on 2D rendering, and separately to tutorials dealing with images. The 'creating a GUI' part is worthy of its own tutorial as well.
    I am new to JFrames having spent most my time with console/text only programming.And we come back to. A simple game is a console based game.
    If somebody was set on learning to create GUIs, I would recommend they steer clear of GUI based games until they have completed a number of GUI based projects that do not involve custom painting (let alone the intricacies of doing custom painting in a responsive game that renders at nn FPS), which I suspect is what is needed to recreate a Super Mario game.
    KISS!

  • Where can I find a portal server for JAVA development?

    Hi, everyone:
    I am looking a portal server which can be used under Windows envorinment and related development environment (toolkit or SDK).
    I have done some search through IBM and SUN's web site and I can not find any portal servers that running on Windows plarform for download and related Windows development (toolkit or SDK).
    Where can I find some trial versions of portal servers running under Windows and related Windows development (toolkit or SDK)? I want to use JAVA to development portal, so Microsoft does not provide any useful information.
    I just want to use basic functions of portal servers so I think other portal servers other than IBM and SUN's can also be used, maybe an open source one can be used. But I do not know what are they and where can I get them. :-)
    So, anyone can help me to introduce a portal server that can meet my needs. Or provide me information where to download IBM or SUN's portal server running under Windows and related Windows development (toolkit or SDK).
    Best regards,
    George

    I just want to use portal server and deploy some
    applications written in JAVA. Have I made myself
    understood?
    Still not clear.
    Do you want a server application that deploys software. For example you create a game. Someone logs into your "portal server" and downloads the game from that?
    Or do you just want to know how to package a java app that you have already written, and then put it on a CD so someone can install that on their computer?

  • Need to find the source code for java.util.LinkedList

    Hello all,
    I'm new to the forums and I actually need the LinkedList source file as well as all the source files for all Java packages and libraries. Please post a link here if you can, or email me at [email protected]
    Thanks again!
    copter_man

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • Java Advanced Imaging - Imaging Client Server application

    Hello,
    I try to send images compressed from a server to a client, the first Image is received by the client, but nothing append after.
    The client send an error that says that the socket connection is closed and I don't know wky !
    I am using "JAI" for the image compression on the server and I use the method ImageCodec.createImageEncoder(OutputStream dst, ImageEncodeParam param)
    OutputStream is the data stream between the client and the server, I have used DataOutputStream and OutputStream object but I got the same error.
    (In an example of JAI they use FileOutputStream, I just change it for OuputStream in order to send data on the socket).
    ImageEncodeParam is null.
    I use an other socket that permits to launch commands through text command. So text commands and data are on 2 differents sockets.
    Every time the client ask to the server for an image and the client wait for the stream data.
    I know that it could be easer using RMI but it will be better for me to use a stream.
    Could you tell me what way should I take, Could you show me an example?
    Thank you in advance,
    Regards.

    This has nothing to do with imaging.
    You are sending something via a socket and that is the problem.
    The most likely problems:
    1. You are sending/reading text not binary.
    2. You are sending data not a message (a message contains data) and thus have no way to determine when the actual message has arrived.
    3. You are just doing something wrong with your socket code.

  • Thumbnails with Java Advanced Imaging

    Hi,
    I'm trying to create thumbnails from images that I am loading into an application. Scaling won't work as my images may be of different sizes and I want to apply the function to all images.
    Any Ideas,
    Thanks,
    Kieran.

    Yes scaling will work. You just have to figure out the scale you need
    to use for each image.
    check the x and y size of the image. find the longest of these and then
    figure out the scale factor needed to get the biggest dimension to fit
    the thumbnail.
    matfud

Maybe you are looking for

  • HT1933 clash of clans problems automatic payments

    Despite valiant efforts to stop autopayments for credit card for Clash of Clans, as used by my son, the payments keep appearing on my bill. Is there onother way of stopping this other than obtaining a new credit card?

  • Complex xml

    I have gone through this with vb and now powershell.  I am trying to do this without writing a bunch of granular vb code. I am trying to read a complex xmlFile (with a schema doc) into tables and then upload those tables into SQL. When importing to a

  • Personal Domain Set-Up Question

    Hi fellow iwebbers, I had a quick question about personal domain set-ups. I am using a domain.com's registrar for my domain. Their DNS management system requires two entries: one for the "www" and one for the canonical name. If web.mac.com is the "ww

  • Compressor 1.1 updates.... and compressor 1.2.1

    Hello My computer keeps telling me I need to update my compressor 1.1 to 1.2.1 . I have downloaded the update but my version stays at 1.1 could you offer any advise? thanks TONY

  • Retention amount/ payment term

    Hi Sap Gurus , I have a request from the client to configure , retention amount from vendors Can any one please xplain the configuration steps for the business process mentioned below . Cost of the COntract 100000 thousand , to be executed in four mo