Animated GIF not cycling frames in Tomcat

I have pages that use animated gif files to get across a point.
In the IDE, they cycle the images as they should
SunAppserver cycles them properly.
I only get the first frame in Tomcat (5.5.7)
Over on the java.net, I saw this on a page concerning JAI:
GIF
The decoder supports animated GIF files and GIF files with transparent background. Only the first frame of an animated GIF file may be loaded via JAI; subsequent frames must be obtained via direct use of the ancillary codec classes.
Um, am I missing something, or is this a Tomcat problem ?

You just need transparency in your file. Not sure if it has to be pre-multiplied. In graphic converter you need to remove the backgrounds. Haven't used GC in years so can't say how you can be sure it's gone but in Photoshop, Illustrator and After Effects you can choose to have a checkerboard background to tell you when you are seeing 'thru' the image and by how much (the overall opacity or mask of the whole image if that doesn't confuse the issue).
If you are using PS images they will almost certainly generated with a set of rectangles including a perimeter cropping box and white background and these need to go either before it's bitmapped in a vector base app or the relevant pixels erased after it has been bit mapped in GC. As previously mentioned, if you have a unique bkgd colour, colour selecting/keying are some ways to do this). Much faster for >10 images to generate the plots without the bkgd but this may not be possible, what software is source material coming from?
I regularly bring in vector based moving art-work into keynote with alpha from Adobe AE, Apple Quartz and rendered .mov files. Some codecs (H.264) don't support a separate alpha channel (RGBA) but PNG (slow to render) and animation and a bunch of others do. Pre-multiplying removes the A channel in the RGBA (by multiplying the R/G/B by the A values) thereby speeding and making compatible with some GPUs/render pipelines.

Similar Messages

  • Why are animated gifs not displaying animations in the preview?

    Why are animated gifs not displaying animations in the preview?
    My coworkers and I are not seeing a animation in the preview pane in Adobe Bridge CS6 even when clicking the play button in the preview window. However, we do see a graphic of the first frame and one person sees 1 frame when clicking play and one other frame and then the animation stops, however, that is not the complete animation.
    I'm using Windows 7 32 bit
    My coworkers are using a mac.
    One coworker has apple OS Mountain Lion with a Intel Quad-Core Xeon – 64 bit system.
    Is this fixable or in the works as a patch? Otherwise we have to open these docs in a browser in order to view them properly.

    I've just come to the realization that some animated gifs do play fine and others do not. A coworker of mine suggests that if it's an animation made via Adobe Photoshop, it'll work in bridge but will not if it's made using something else.

  • Safari - Animated GIF not Animating Issue

    I am frequenting site and have noticed animated gifs not animating properly on this page. The site is http://www.woot.com
    Problem Detail:
    There are two "whirly lights" on each side of a progress bar under the item currently for sale. The left light starts to animate while the page is loading but stops while the right light continues its animation.
    This particular site may usually only uses these images every once in a while so if no one checks this in the next couple days the images will no longer be there. I created a web archive the site which I could send if this page does go away. The issue does not happen in Firefox or Internet Explorer.

    Hi and Welcome to Apple Discussions
    I get the same effect as you in Safari. Loaded with no problem in Firefox. Page does have coding errors, which can lead to inaccuracies in how the page is rendered. Safari is much more strict about correct coding than Firefox, adhering to web standards set out by Web Standards Project.

  • Open and edit animated .gif while preserving frame timing

    CS4 Premium Design Edition, Win XP
    I was disappointed with the removal of Image Ready from CS3 because although some of the functionality was placed into Photoshop 10, there was no way to open and edit an existing animated .gif while preserving the timing of each individual frame. I was told on the PS forum at the time that I really needed to use Fireworks. I resented that, because I was very happy with Image Ready and I didn't want to have to learn a new application just to gain functionality that had been included in previous versions of PS/IM.
    I've now got CS4 Premium Design Edition which of course includs Fireworks... and here's what Help has to say on the subject of imported .gifs.
    "Note: When you import an animated GIF, the state delay setting defaults to 0.07 seconds. If necessary, use the States panel to restore the original timing."
    This is no use to me. What if I don't know the individual frame timings? What if there are 200 frames with varying timings?
    Simple question: which current Adobe product is capable of importing a .gif while retaining the frame timings? If anyone knows, or if I've misunderstood the nature of the Fireworks Help quote above, I'd really appreciate some input here. Thanks :)
    Not so simple question: why was an excellent gif-editing application thrown out to have its functionality partially replaced by a bunch of scripts and half-effective workarounds cooked up by desperate users ("import a gif by using the video import and typing *.* into the filename box..")? It's a fair question I think.
    Mark

    Hi Bob, that's not glib at all, it's a reasonable question.
    I uninstalled it along with everything else when I installed CS3, in the reasonable expectation that whatever replaced IR would be at least equal in functionality.
    Perhaps I should just dig out CS2 and install IM from there, but I have some serious reservations about doing so, because I don't know if/how a partial install of CS2 will impact upon my installation of CS4, and I'm not confident of getting support.
    I am also curious to know if/why Adobe actually removed basic functionality without replicating or replacing it in their other software. I really want to know: which recent, currently supported Adobe product
    should I be using in order to regain this functionality? Or do Adobe no longer produce a geniuinely comprehensive .gif-editing application?
    Mark

  • Animated .gif not moving

    I've been intrigued by the new animated "postcards" or cinemagraphs (for example, see http://fromme-toyou.tumblr.com/tagged/gif). I found a great tutorial about how to do this using Photoshop Extended and the animation panel. I created my own, and then followed the instructions for saving the file:
    1. "Save for Web and Devices"
    2. make sure to save as GIF, looped "forever"
    When I previewed the gif (from the "save for web and devices" dialog box), it worked great.
    But when I save the gif, it doesn't move. It is just one frame of the animation, as a static photo. When I click the file, I get a "Preview" that shows all the frames, but I can't ever get it to move.
    Is there a step I'm missing? Or is there some operating system setting I need to change? I've never created an animated gif before, but I can see other people's animated gifs in my email. (I'm attaching my gif in case you can figure it out from that.)
    OKAY...I looked at the attachment, and it moves (my dog's eyes). This is the only time it has worked. I've tried to email it, post it on Tumblr, open it in my browser, but it never worked. Now, I post it here, and--at least as I look at the attachment--it works here. How can I get it to move when I post it online or try to send it via email?
    I'm running Mac OSX 10.6, Photoshop CS 5.1.
    Thank you!
    Carol

    Some email clients disable animated GIFs.
    Web sites like Tumblr that have image upload functions may further process your file during upload by removing its animated features. You could control this by hosting images on your own web site.
    In general, animated GIF files are not ideal for emails because of their large size. GIF is an inefficient format for photorealistic animation/video.

  • Animated Gif - Problem with Frame Delay

    Mac OS X 10.5.8 
    PSE 6.0
    I just created an animated gif by following the steps in PSE Help.  It says that I should be able to adjust the rate at which the images rotate by changing the Frame Delay measurement but I am unable to change it.  In fact I am unable to change anything in the Animation section of the dialog box. 
    When I check Animation, the options appear to become active (they're no longer greyed out) but I can neither uncheck the Loop option nor change the Frame Delay option.  All other sections of the dialog box work fine.
    Your help would be most appreciated!
    Beth

    Unfortunately this is broken in PSE 6 and PSE 8. You can tab into the frame delay box if you start above it someplace on that side of the screen, and it appears to let you change the rate, but your choice doesn't really affect the actual frame rate. The only workaround is to duplicate frame layers that you want to stay onscreen longer (so it will be changing just as fast, but not visibly).

  • Problem to create animated gif using transparent frames

    Hi, everyone:
    My name is Edison, I am playing with Gif89Encoder utility classes to make an animated gif which is a requirement for my course work.
    I got some problem about the transparent frames. I used the png image as the frame to create the animated gif,
    those pngs have transparent colors and the background is totally transparent, when i create the animated the gif with those
    frames, the animated gif display the colors but without transparency for those colors, but the background is transparent as expected.
    I am not sure if I should IndexGif89Frame or DirectGif89Frame for the colors from the Gif89encoder package.
    Is there anyone got the same problem and knows how to fix it?
    The following is how i setup the colors in my png file, the alpha channel is 80.
    Color[] colours = new Color[7];
              colours[0] = new Color(255, 255, 255, 0);
              colours[1] = new Color(128, 128, 255, 80);
              colours[2] = new Color(128, 0, 128, 80);
              colours[3] = new Color(0, 128, 128, 80);
              colours[4] = new Color(128, 128, 0, 80);
              colours[5] = new Color(204,102,255,80);
              colours[6] = new Color(255, 0, 0, 80);The code i did to generate gif:
    public void run89Gif()
            Image[] images = new Image[4];    
            try{
                images[0] = ImageIO.read(new File("D:/temp/0.png"));
                images[1] = ImageIO.read(new File("D:/temp/1.png"));
                images[2] = ImageIO.read(new File("D:/temp/2.png"));
                images[3] = ImageIO.read(new File("D:/temp/3.png"));
                OutputStream out = new FileOutputStream("D:/temp/output.gif");
                writeAnimatedGIF(images,"Empty annotation", true, 1, out);         
                images = null;
            }catch(IOException er){ }
    static void writeAnimatedGIF(
            Image[] still_images,
                String annotation,
                boolean looped,
                double frames_per_second,
                OutputStream out) throws IOException
            Gif89Encoder gifenc = new Gif89Encoder();
            for (int i = 0; i < still_images.length; ++i){
               gifenc.addFrame(still_images);
    gifenc.setComments(annotation);
    gifenc.setLoopCount(looped ? 0 : 1);
    gifenc.setUniformDelay((int) Math.round(100 / frames_per_second));
    gifenc.encode(out);
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi, everyone:
    My name is Edison, I am playing with Gif89Encoder utility classes to make an animated gif which is a requirement for my course work.
    I got some problem about the transparent frames. I used the png image as the frame to create the animated gif,
    those pngs have transparent colors and the background is totally transparent, when i create the animated the gif with those
    frames, the animated gif display the colors but without transparency for those colors, but the background is transparent as expected.
    I am not sure if I should IndexGif89Frame or DirectGif89Frame for the colors from the Gif89encoder package.
    Is there anyone got the same problem and knows how to fix it?
    The following is how i setup the colors in my png file, the alpha channel is 80.
    Color[] colours = new Color[7];
              colours[0] = new Color(255, 255, 255, 0);
              colours[1] = new Color(128, 128, 255, 80);
              colours[2] = new Color(128, 0, 128, 80);
              colours[3] = new Color(0, 128, 128, 80);
              colours[4] = new Color(128, 128, 0, 80);
              colours[5] = new Color(204,102,255,80);
              colours[6] = new Color(255, 0, 0, 80);The code i did to generate gif:
    public void run89Gif()
            Image[] images = new Image[4];    
            try{
                images[0] = ImageIO.read(new File("D:/temp/0.png"));
                images[1] = ImageIO.read(new File("D:/temp/1.png"));
                images[2] = ImageIO.read(new File("D:/temp/2.png"));
                images[3] = ImageIO.read(new File("D:/temp/3.png"));
                OutputStream out = new FileOutputStream("D:/temp/output.gif");
                writeAnimatedGIF(images,"Empty annotation", true, 1, out);         
                images = null;
            }catch(IOException er){ }
    static void writeAnimatedGIF(
            Image[] still_images,
                String annotation,
                boolean looped,
                double frames_per_second,
                OutputStream out) throws IOException
            Gif89Encoder gifenc = new Gif89Encoder();
            for (int i = 0; i < still_images.length; ++i){
               gifenc.addFrame(still_images);
    gifenc.setComments(annotation);
    gifenc.setLoopCount(looped ? 0 : 1);
    gifenc.setUniformDelay((int) Math.round(100 / frames_per_second));
    gifenc.encode(out);
    Thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Animated gif not moving, image.animation_mode already set to Normal

    ''dupe of - https://support.mozilla.org/en-US/questions/932846 - locking''
    With image.animation_mode already set to Normal, animated gif are not moving, it seems only the first frame is downloaded. I tried downloading the image, it also seems that only the first frame is downloaded. Then I disabled all extensions, the problem persists. Then I use a whole new profile, there seems to be no problem.
    The question is, is there another hidden settings in firefox which cause this trouble? I do not want to start a new profile just because of this. (It also happens in Firefox version 13)

    Do you see the animation if you check the image in Tools > Page Info > Media or open the image directly in a tab?
    Some security software (firewall) can block animated images and send a normal image instead, so can try to check the advanced settings for Firefox in the firewall if the problem isn't in Firefox.

  • Animated GIF not animated

    Hi,
    I have searched and searched but can't find a solution.
    I have an animated gif on my page but it only displays the first frame and does not animate.
    Anyone know how to make it work??

    if the gif is valid, it should animate without any help. Try opening the gif with a program like irfanview and see if it animates.

  • A mystery: Animated GIF not displaying correctly.

    I've started adding images to a >1 year old game that I kind of abandoned, which formerly used hard-coded graphics. I'm looking to use a 4 frame long animated GIF of what would appear to be a rotating blade-like enemy. (Not actually a blade, but this is irrelevant.)
    The GIF which I am using can be viewed here: ftp://72.141.73.226/ftproot/av.gif
    I have taken screenshots of the 4 frames I am receiving, and slowed the result down here: ftp://72.141.73.226/ftproot/broken.gif
    I'm not quite sure why it's doing that.. Any ideas?
    Also, I've got it programmed so that when the enemies are defeated, they emit a small explosion, which is also an animated GIF. It can be found here: ftp://72.141.73.226/ftproot/boom.gif
    The images are drawn by the class AI class, which extends JPanel (For the ImageObserver status). The image displayed is determined when a method called changeImg is called.
    public void changeImg (String img) {
        this.img = Toolkit.getDefaultToolkit().getImage(img);
    }When the health reaches 0, the 'boom' image (found above) is put onto the object's 'img' variable, which is later called like this:
    g.drawImage (img, x-w/2, y, x+w/2, y+h, 0, 0, 20, 20, this);Essentially, it draws the image at certain coordinates depending on the position of the user, and sizes the image depending on the size of the user (variable with difficulty.) and you can see where it is using 'this' as an ImageObserver, because it just so happens to be one. (This is the only way I know to display images.)
    There's a small problem, however. When the 'boom' graphic is loaded, it floats around in memory, not being drawn, because it's not being told to, but evidently goign through the animation anyway. This means that all explosions are synchronized, so say I defeat an enemy at frame 0, and then another one at frame 5. The 10 frame explosion is already half-complete, so the second enemy's explosion animation is the latter half of the explosion animation, followed by the inital half. I tried creating the GIF so that it would be set to 'play once', but then after the first enemy exploded, all enemies would display the last frame of the explosion, instead of playing the animation once.
    Any help would be greatly appreciated.
    (This isn't for homework, don't worry. I finished this assignment over a year ago, and just decided to add to it a bunch.)

    @OP:
    Are you aware of the fact that your FTP server is wide open?

  • Animated GIF - not working properly

    Hi,
    I'm trying to get an animated GIF working in my swing program. I am drawing on a JPanel using paintComponent.
    Here's the thing: It will animate, (faster then it should) and then pause animation for 5 seconds, then animate again. I am trying to achieve constant animation, at the framerate in which is set inside of the GIF file. Is there a better method to use then what I am using? It's not a repaint problem, as I am repainting constantly. Here's what I got:
    String filename = "myimage.gif";
    Image img = Toolkit.getDefaultToolkit().getImage(filename);
    g.drawImage(img, x + 28, y + 79, this);A code snippet would be helpful as I am only two weeks into Java and have difficultly reading the Sun documentation.
    Thanks for reading,
    Nate

    Does that entire code snippet appear in the paintComponent method? It should be more like this,
    String filename = "myimage.gif"
    Image img = Toolkit.getDefaultToolkit().getImage(filename);
    public void paintComponent(Graphics g) {
         g.drawImage(img,x+28,y+79,this);
    }You shouldn't try to get the image from the toolkit everytime. Just get it once, and everytime you paint the image, the next frame will be painted.
    To introduce a constant delay you can use javax.swing.Timer to simply repaint the panel whenever you want to. Here's sort of a basic example
    import javax.swing.ImageIcon;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    import java.awt.Image;
    public class GifAnimation extends JPanel
            implements java.awt.event.ActionListener {
        private Image img;
        private Timer timer;
        private int delay;
        public GifAnimation(String fileName) {
            java.awt.Toolkit toolkit = java.awt.Toolkit.getDefaultToolkit();
            //The image icon will load the image
            img = new ImageIcon(toolkit.getImage(fileName)).getImage();
            if (img.getWidth(null) == -1 && img.getHeight(null) == -1) {
                System.err.println("Unable to load image: " + fileName);
            }else {
                setPreferredSize(new java.awt.Dimension(img.getWidth(null),
                                                       img.getHeight(null)));
            //in milliseconds
            this.delay = 100;
        public int getDelay() {
            return delay;
        public void setDelay(int delay) {
            this.delay = delay;
            if (timer != null) {
                timer.setDelay(delay);
        //This method is called when a component is connected to a native
        //resource.  It is an indication that we can now start painting.
        public void addNotify() {
            super.addNotify();
            if (img.getWidth(null) != -1) {
                timer = new javax.swing.Timer(delay, this);
                timer.start();
        public void removeNotify() {
            super.removeNotify();
            if(timer != null) {
                timer.stop();
                timer = null;
        public void actionPerformed(java.awt.event.ActionEvent e) {
            //you can alternatively use paintImmediately(), but there are
            //going to be certain consequences to using that.
            repaint();
        public void paintComponent(java.awt.Graphics g) {
            //Clears the background before drawing the next frame
            super.paintComponent(g);
            if(img.getWidth(null) != -1) {
                int x = (getWidth() - img.getWidth(null))/2;
                int y = (getHeight() - img.getHeight(null))/2;
                g.drawImage(img,x,y,this);
    }In a GIF file each frame has a duration specified in hundreds of a second. And each frame also has an offset position (not all the frames need to have the same width or height). I can show you how to load this information from the file, but I'm not sure if it would bring major confusion. It requires the use of javax.imageio.ImageIO and javax.imageio.metadata.IIOMetadata . It also requires a recursive method to search the image's metadata for the needed information (a bit overwhelming for a person two weeks into java).

  • Animated gifs not working

    I have created several animated gifs (using photos on a continuous loop) in photoshop on my mac, but they aren't working when we upload the gifs to our website. I've been creating these short animations for ages and all of the old ones are still working online. However I'm not doing anything differently, and am being careful to create them properly. The animations also play properly when I drop them into any old web browser. It's only when we upload them to a website that they stop working and display only the first frame.
    Since a) I haven't changed the way I make these animated gifs, b) they work when dropped into a web browser, and c) the previously created animations are working online, does anyone have any idea why these recently created ones aren't working? Is it likely to be a photoshop problem?
    Any ideas appreciated!

    Can you share a sample web page?
    Which browsers are you using to test the live web pages? Some browsers may have optionally disabled animated GIFs (although this would be unlikely if one GIF plays and another does not). ...and Safari has had a history of quirks with animated GIF play.

  • Why does animated .gif not work with windows?

    I have created an animated .gif to place in a powerpoint presentation, but when I sent it to my client who used a windows computer, it does not work. When I try to open the .gif in my windows 98 virtual machine, it says it has errors.
    I created it in photoshop CC using the timeline and saving it with "save for web".

    AAAAAAAGGGGGGHHH!  Stupid Powerpoint corrupted the files when it "packaged" them
    Thank you for pointing me in the right direction.
    It is very difficult to figure out what my client is doing on his end.
    It won't let me mark you both as correct.

  • Animated .gif not reloading

    Here's my problem:
    I'm trying to run an animation whenever a certain button is pressed. The file is an animated .gif. It works... but only the first time. I'm trying to figure out how to work more than once. The image is being loaded in a JLabel. Suggestions? Any help is greatly appreciated.
    some small parts of my code that may help:
    private static ImageIcon sinkHoop = new ImageIcon("images/sinkhoop.gif");
    private static JLabel hoopLabel = new JLabel(hoop);
    public void animateSinkHoop()
    hoopLabel.setIcon(sinkHoop);
    }

    I guess I've stumped everyone here.Today, everyone's stumped. But in the not so distant past:..
    http://forum.java.sun.com/thread.jsp?forum=31&thread=340088

  • Why is an animated GIF not appearing on my webpage?

    I have succesfully built a site that is ready for publication. The client submitted an ad for one of his suppliers that he wants to promote. It is an animated GIF from AVG.
    I placed it on the home page. It looks great. It shows up in previews. When I publish the site online, the GIF does not display. If I export the site as HTML and view the files locally, the file appears as it should.
    When I view the online version on Firefox, there is no GIF file visible. When I use Chrome to view the site, the GIF is there. The client says for him it's vice versa. Firefox shows the GIF, but Chrome does not.
    I did not apply ANY styling to the GIF. It is only placed on the page as is.
    I cannot figure this one out. HELP.
    The site is located at: http://72.29.127.6/~pcbasics/
    I will submit the muse file upon request.

    I was wrong, it is not NTFS. According to a 700 mHz eMac running 10.3.9, it is Format: Mac OS Extended (Journaled). And it mounts the desktop on the eMac as well as reading and writing. I can copy files to it and remove them on the eMac.
    My powerbook 1.5 gHz on the other hand, still not mounting.
    Given this error I will repost this problem under a new subject.
    Why would a drive mount an eMac desktop but not a Powerbook?

Maybe you are looking for

  • Downloading to itune folder

    I installed The Dr. Laura Media Center so i could get their podcast, because itune doesn't download from their site. I must use their application which downloads their podcast to the default music folder. I use their program to change the folder for

  • How do you transfer puchased song from your ipod to itunes library?

    How do i tranfer my songs that i have purchased on my ipod touch 2nd gen. to my itunes library? there doesn't seem to be any specific button that says tranfer or anything that prompts you. i want to update my ipod to the newest version but i dont wan

  • Invoking web service through apex.

    Apex 4.1, I'm trying to bind a simple web service to my apex page. Web service is hosted in a different server. When i try to add the path reference of WSDL file i'm getting the error message. Obviously its expecting a proxy server address to be conf

  • Where to change encoding setting?

    Here are my custom encoding settings for video: 03.06.2015-17.27.37 - HOLLY_HOUSE's library I wish to change bitrate encoding from VBR1 to VBR2. I'm sure it's possible but I can't find where to do that. Can you direct me there? thanks in advance!

  • I subscribed and am trying to convert but it is still uploading after 2 hours

    I subscribed to the AdobePDF converter, it was approved.  But it is still uploading after two hours.  What do I do?