Animated gif changes color palette while playing

Hi everyone,
I've been creating animted gifs using Matlab and the ImageMagick suite (convert). If I open the gifs in Preview, the color comes out fine in each frame; however i I use Quicktime (which is necessary, that's what we use for presentations) the color palette will change as the frames play.
I just got the newest version of Quicktime, hoping that it would solve the problem, but it didn't. Any ideas?

I'm not familiar to the software but I can guess what is happening.
Too many colors. A GIF is 8 bit (256 colors) but some of them are not used by all software. Windows and Mac's are different.
Does the software offer a way to reduce the number of colors used? Can you get it down to 8 bit? Can you discard unused colors with some other software?
Have you considered building an image sequence movie? These allow many different images formats and support up to 32 bit formats (millions of colors).
QuickTime Pro ($30) can import a series of images as a movie. The file size is much smaller than any video format used today (just the total of the images file size).

Similar Messages

  • Animated GIF image gets distorted while playing.

    Hi,
    I have some animated gif images which I need to show in a jLabel and a jTextPane. But some of these images are getting distorted while playing in the two components, though these images are playing properly in Internet Explorer. I am using the methods insertIcon() of jTextPane and setIcon() of jLabel to add or set the gif images in the two components. Can you please suggest any suitable idea of how I can get rid of this distortion? Thanks in advance.

    In the code below is a self contained JComponent that paints a series of BufferedImages as an animation. You can pause the animation, and you specify the delay. It also has two static methods for loading all the frames from a File or a URL.
    Feel free to add functionality to it, like the ability to display text or manipulate the animation. You may wan't the class to extend JLabel instead of JComponent. Just explore around with the painting. If you have any questions, then feel free to post.
    The downside to working with an array of BufferedImages, though, is that they consume more memory then a single Toolkit gif image.
    import javax.swing.JComponent;
    import java.awt.image.BufferedImage;
    import java.awt.Graphics;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageReader;
    import javax.imageio.stream.ImageInputStream;
    public class JAnimationLabel extends JComponent {
        /**The default animation delay.  100 milliseconds*/
        public static final int DEFAULT_DELAY = 100;
        private BufferedImage[] images;
        private int currentIndex;
        private int delay;
        private boolean paused;
        private boolean exited;
        private final Object lock = new Object();
        //the maximum image width and height in the image array
        private int maxWidth;
        private int maxHeight;
        public JAnimationLabel(BufferedImage[] animation) {
            if(animation == null)
                throw new NullPointerException("null animation!");
            for(BufferedImage frame : animation)
                if(frame == null)
                    throw new NullPointerException("null frame in animation!");
            images = animation;
            delay = DEFAULT_DELAY;
            paused = false;
            for(BufferedImage frame : animation) {
                maxWidth = Math.max(maxWidth,frame.getWidth());
                maxHeight = Math.max(maxHeight,frame.getHeight());
            setPreferredSize(new java.awt.Dimension(maxWidth,maxHeight));
        //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();
            //Make anonymous thread run animation loop.  Alternative
            //would be to make the AnimationLabel class extend Runnable,
            //but this would allow innapropriate use.
            exited = false;
            Thread runner = new Thread(new Runnable() {
                public void run() {
                    runAnimation();
            runner.setDaemon(true);
            runner.start();
        public void removeNotify() {
            exited = true;
            super.removeNotify();
        /**Returns the animation delay in milliseconds.*/
        public int getDelay() {return delay;}
        /**Sets the animation delay between two
         * consecutive frames in milliseconds.*/
        public void setDelay(int delay) {this.delay = delay;}
        /**Returns whether the animation is currently paused.*/
        public boolean isPaused() {
            return exited?true:paused;}
        /**Makes the animation paused or resumes the painting.*/
        public void setPaused(boolean paused) {
            synchronized(lock) {
                this.paused = paused;
                lock.notify();
        private void runAnimation() {
            while(!exited) {
                repaint();
                if(delay > 0) {
                    try{Thread.sleep(delay);}
                    catch(InterruptedException e) {
                        System.err.println("Animation Sleep interupted");
                synchronized(lock) {
                    while(paused) {
                        try{lock.wait();}
                        catch(InterruptedException e) {}
        public void paintComponent(Graphics g) {
            if(g == null) return;
            java.awt.Rectangle bounds = g.getClipBounds();
            //center image on label
            int x = (getWidth()-maxWidth)/2;
            int y = (getHeight()-maxHeight)/2;
            g.drawImage(images[currentIndex], x, y,this);
            if(bounds.x == 0 && bounds.y == 0 &&
               bounds.width == getWidth() && bounds.height == getHeight()) {
                 //increment frame for the next time around if the bounds on
                 //the graphics object represents a full repaint
                 currentIndex = (currentIndex+1)%images.length;
            }else {
                //if partial repaint then we do not need to
                //increment to the the next frame
    }

  • Change color palette of combination chart

    Hello everyone,
    I am experiencing a problem when trying to change to color palette of a combination chart.
    According to the api there should be a method setColorPalette(aColorPalette) and a property colorPalette;
    (JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.viz.ui5.types.Combination)
    when I try to call this method I receive the following error:
    TypeError: Object [object Object] has no method 'setColorPalette'
    I introduced the combination chart before by calling jQuery.sap.require("sap.viz.ui5.types.Combination"); outside of the controller;
    I also tried to add the porperty colorPalette in xml, but it seems to be ignored.
    Has anyone an idea on what the reason could be?
    Best regards,
    Benedikt

    Hi Benedikt,
    you can find below working code of changing color palette of chart.
    This is based on pie chart but accordingly you can use for combination chart.
    JS Bin - Collaborative JavaScript Debugging</title> <link rel="icon" href="http://static.jsbin.…
    Regards,
    Chandra

  • Changing animated gif's colors

    Hi,
    I'm using Fireworks CS5. I opened an animated gif and I wanted to replace some of the colors with other colors and have it do this for the entire animation. I know that I can simply change the colors by going to the Optimize panel and select one of the colors in the palette to change it. But I want to use an exact color by pasting in the color's HTML hex code and I can't find a way to do that. I tried using the "Replace Palette entry" option and pasting in the code there. But while the color in the palette window changed correctly, the color on the actual gif was wrong (for instance, I changed an orange to a gray, but the preview image simply replaced the original orange with a different orange instead of the gray I wanted).
    Any help would be appreciated. Thanks!

    The replace palette entry feature only works on vectors. Your GIF animation is a bitmap. I'm afrad the only choice you've got is to hand color each state, or recreate the animation with the colors you like.

  • Animated gif changes to black and white when exporting

    A student created an animated gif of a solar system for class. When he tries to export it as an animated web gif, it changes everything to grayscale.

    If you go to File>Image Preview, there's a drop down menu called "palette". This is probably set to black and white or greyscale. Change it to exact or adaptive.

  • Animated GIF won't Animate while page is loading

    Hi all,
    I need my animated gif to be animated while other page elements are loading, but it is frozen until the page loads. Any advice?
    Regards,
    Kelly
    Personal Blog: http://thebitsthatbyte.com

    There are few options available, refer to the following posts,
    http://stackoverflow.com/questions/5829382/animated-gif-while-loading-page-does-not-animate
    http://www.webdeveloper.com/forum/showthread.php?90647-RESOLVED-ie-animated-gif-freeze-til-page-loads
    http://forums.asp.net/t/1814498.aspx?loader+gif+IE+problem
    --Cheers

  • Animated .gif takes time to start playing in web

    Hello! I'm new here...
    The title says it pretty much...
    I've made some .gif animations for the web. I use "save for web & devices" and get a nice compact file, but once it's uploaded to a server and I open the .gif in my browser (google chrome), it takes a while to start changing from the first frame to the others even though the delay is just 3 seconds. I use PS CS4 Extended.
    Is this normal .gif behaviour and the issue may be dependant on my system (HP compaq nx7010) or is there a button unflipped somewhere in Photoshop?

    Fsr2000 wrote:
     a nice compact file
    How many kilobytes make up your definition of a nice compact file?
    Playback speed can be affected by connection bandwidth, the particular browser used, and the system speed.

  • Win8.1, firefox is changing color temperature while scrolling/or changing tabs over different colored webpages

    windows 8.1 firefox 35.0.1 is chaning the color temperature across the whole screen(including the bottom start bar) while browsing(scrolling) and/or when changing tabs between a light(white) and darker pages.
    I've searched google and firefox settings without finding any information about this. I'd like it removed as I find it somewhat annoying
    but where are the settings?
    -David

    If this is only happening in Firefox then try to disable hardware acceleration in Firefox.
    You can try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    You need to close and restart Firefox after toggling this setting.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration

  • Toolbars changing color hues while using Chrome?

    I've noticed recently that when using Chrome, the toolbar and display color elements will shift to a blue-ish hue depending on the website. I attempted to take a screenshot however it's not detectable as it's contained only to the App being open, so I have included some iPhone photos:
    Normal grey toolbar:
    Blue-hue while on Facebook (for example):

    Maybe this will help. If you monitor the "More Like This" box, other solved threads appear. Opening them usually displays other threads.
    https://discussions.apple.com/message/20515230#20515230

  • Best quality animated gif export

    Hi
    I was doing just fine exporting animated gifs (in terms of quality output) and all of a sudden on an update to my fireworks png my exports (no matter what options I change) are just not as good quality as before.
    Essentially, I am trying to get as close to the JPEG 100% quality (best quality) I can get - drop shadows on items just don't like that great at moment.
    Could someone please advise what is absolute optimum setting for best quality output for an animated gif - I am not concerned about file size.
    many thanks
    Jeff

    Without seeing the image/animation, I can't make specific comments.
    However. Keep in mind that the GIF format has an indexed palette of 256 colors, total, one of which can be transparent. If you have a still image of 256 shades of red, and a still image of 256 shades of blue, they'll look fine as GIFs. If you try to combine them as an animated GIF, then the palette will need to be 128 shades each of red and blue, so neither of the images as frames in the animation will look as good as they do as stills.
    Also, Fireworks doesn't always give you the maximum amount of colors. If you have an image with 1000 colors, and you export to GIF, you probably won't get 256 colors in your palette. Go to File>Image Preview and see what your palette is. If necessary, add colors from your image where you notice banding (with dithering off).
    Finally, the two image formats are not equally appropriate for all image content. GIF is good for line art of solid colors. It isn't good for photos or gradients. If you can forgo your drop shadows you'll probably get better quality in the essential parts of the images. JPEGs are good for photos and gradients (although I prefer PNGs for gradients, myself), and are not good for line art. Unfortunately, if you want an animation, you need a GIF or Flash.

  • Animated Gif Editing Help

    Im trying to add a face to every layer of the gif, so i can move the head, eyes, and mouth.. when i add the image of the face to layer 1 of the animated gif, its good, i hit play and the first frame is the head and it disapears on the second, but when i duplicate and edit the face and put it above the second frame of the animated gif the origional face gets edited aswell, making it unable to create the illusion of the eyes moving from one place to the other, how can i have different images of the face on every frame of the video?

    Hi,
    What version of Ps do you have and what platform are you using? Are you working with video content for the layer changes, or do you have a still that you're manupulating?
    regards,
    steve

  • Exporting animated gif to web shows only a transparent pane.

    I have created a very simple four frame animated gif in CS6. It plays and transitions fine, but when I come to save it to web the preview pane is transparent.
    I used 'create video timeline' as my timeline option.
    I must be doing something basic very wrong, but can't figure it out.
    Any help please!
    Thank you.

    In terms of replicating the problem, this is what happened to me.
    I created 4 frames of animation in the Video timeline. For each frame, the image only showed for a short time and then disappeared until it switched to the next frame.
    I'll illustrate the problem.
    1. When the playhead is at 1, I see my image just fine.
    2. When I move the playhead, the image disappears, despite all the layers still being visible.
    3. I open the dropdown menu for each frame and see that the Opacity markers don't extend for the whole frame. Essentially the content disappears before it reaches the end of the frame.
    4. I highlight the opacity section and hit delete, so that no change will take place.
    However, you say that the animation plays just fine inside your Photoshop document, leading me to believe that I haven't solved your problem yet!

  • Animated Gif Color Problem

    Hi all,
    I want to make a small animated gif by My lovely software : AfterEffect...
    The problem i face, that when i render my work, i get an animated gif with bad colors (like if i export as 256 colors for example..)
    I put in the export setting MILLIONS OF COLORS ....
    and i get always POOR color depth ...
    I can see the true colors in the After Effect work Panels ...
    Only when i put the composition in the render queu and export as Animated Gif, i get the Poor colors..
    PLEASE HELP ME ...
    Thanks

    As pointed out by the others, the limitation is in the file format. You will never exceed the 256 barrier. This is further complicated by how AE determines the color palette. This usually happens on the first few frames, 'cos naturally the other frames do not exist and AE doesn't know about them. If there is considerable change in the color palette over time, this cannot be accommodated. Therefore you'd really do a lot better by following the advise provided by the others. In addition to Rick's tips, I recommend you work with the perceptive dithering mode when saving your GIFs. This usually gives the "smoothest" result, but may shift the colors ever so slightly. I also recommend to not use transparencies with animated GIFs. They have a severe impact on file size and compression quality as well as possibly the playback performance in your browser. If you know the background color of your web page, it should be part of the file.
    Mylenium

  • Animated gif and gradient color problem

    Hi there,
    I have been trying to create animated gif with gradient background. My animation works alright but the problem is that when I preview either in browser or in the preview mode, the gradient doesnt look smooth. I want to know if there is a way to work around this? I have seen some on other websites and it looks perfect. I'm wondering how they do it.
    I'll appreciate anybody's help.

    Cobby Fred wrote:
    I have to thank you all for your assistance so far. I must say I only know how to put some few things together and I do not understand some of the technical words you used such as dither, geometric dithering, blending mode... But in all I understand that if I blend colors that are close I'll get something close to smooth.
    Here's Wikipedia's page on dither: http://en.wikipedia.org/wiki/Dither Scroll down till you see the images of the cats on the right-hand side. It's a little over half-way. In the original, the cat's pretty much a gradient. If that image is saved as a .gif, see how you get wide areas of color? It almost looks like a paint-by-number picture. This similar to what happens to your radial gradient when you save as .gif. I used the word "geometric," because the radial gradient will produce arcs of grey colors. The third image of the cat has dithering. This means that, instead of setting the colors in the original image to the closest one in the restricted palette, the software tries to figure out how to speckle the image to produce an average that would look better at a distance. Turning on dithering when you go to output your gradient will help make your image smoother, just as the third cat image is smoother than the second. Here's where you turn on dithering if you go through File > Image Preview:
    Here I have my unflattened .png file
    No, it's flattened. It's a single bitmap.
    Here's a noisy image I created. It has a radial gradient at the bottom then a texture layer that has it's visibility off, because I copied it to make a greyscale version to use. I've set that to have 25% opacity and a blending mode of Multiply. Both the opacity and blending mode controls are at the top of the layers panel. This is a FW .png (Edit, no, it isn't! The forum  has stopped supporting that! ):
    If I export the gradient alone, without the texture layer, I can get this (settings are "64-color" greyscale palette and no dithering):
    or this (turning on dithering):
    While the dithered image is better, it still shows the arcs. If I set the texture layer back visible, and export with dithering on, I get this:
    The noise in the texture breaks up the geometric arcs, which makes the image look smoother. Any small texture will do that. Choosing the 64-color greyscale palette gives me either 22 or 26 colors.The 32-color palette gave me 12. You should experiment with the .gif palette settings to see what you like best. Remember that the more colors you assign to your background the fewer colors you have available for your foreground objects.
    As a final point, the red text looks blurry. When I zoom in on it (400%), some of the lines are partially "broken," specifically the verticals on the L, T, and N. You might want to try a different font or adjusting the size so that the aliasing (mapping) to the pixels is cleaner. Italic text in small sizes is difficult to use.

  • Animated gif only plays one time??

    An animated gif created in Photoshop and exported with 'loop forever' output only loops once on my home page. I have not resized, cropped it or added any effects but as it plays once Muse can't have rasterized it.
    I am using adobe muse cc 7.1 build 329, OSX 10.9
    the lilly in the top left gif image should animate continuously. - jimmymcgilchrist.comhttp://www.jimmymcgilchrist.com/index.html
    any assistance appreciated.
    Jimmy

    Hi DrStrik9,
    Thanks, I just tried it directly in the browser and it works fine. When previewing in the finder window on my desktop it works fine as well.
    I have had animated gifs working fine previously on the same muse site as a browser fill and as buttons.
    Nothing has changed about the way I make the animation but these are some variables that have changed:
    - update Operating System from OSX 10.8 to 10.9
    - udate to current muse version
    - switch from Godaddy - wordpress hosting to Adobe Business Catalyst
    - upload via 'publish' within muse rather than via 'upload to FTP host' within muse.
    Thanks,
    Jimmy

Maybe you are looking for