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

Similar Messages

  • Animated gif resizing problem

    Im trying to achieve the following: showing an animated gif that resizes to fill the area of a canvas. I tried the easy way: adding a label and setting the icon for that label, but when trying to resize the image it doesnt show (see code below). Is there any particular way of resizing an animated gif? can the labe-icon approach be used with animated gif that must be resized?
    Thanks a lot in advance.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Image;
    import javax.swing.ImageIcon;
    public class TestFrame extends javax.swing.JFrame {
    /** Creates new form TestFrame */
    public TestFrame() {
    initComponents();
    Image image = this.getToolkit().getImage("C:\\multivideo\\img\\39.gif");
    Dimension dim = jLabel1.getPreferredSize();
    image = image.getScaledInstance(dim.width, dim.height, Image.SCALE_SMOOTH);
    ImageIcon i = new ImageIcon(image);
    jLabel1.setIcon(i);
    jLabel1.setBackground(Color.BLUE);
    pack();
    /** This method is called from within the constructor to
    * initialize the form.
    private void initComponents()
    jLabel1 = new javax.swing.JLabel();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setIcon(new javax.swing.ImageIcon("C:\\multivideo\\img\\40.gif"));
    jLabel1.setMaximumSize(new java.awt.Dimension(1436, 86));
    jLabel1.setMinimumSize(new java.awt.Dimension(1436, 86));
    jLabel1.setPreferredSize(new java.awt.Dimension(1436, 86));
    getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);
    pack();
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new TestFrame().setVisible(true);
    private javax.swing.JLabel jLabel1;
    }

    I don't think getScaledInstance is smart enough to return a scaled image.
    You could try doing your own scaling:
    import java.awt.*;
    import java.awt.geom.*;
    import java.net.*;
    import javax.swing.*;
    public class Animated extends JComponent {
        private Image image;
        private double scale;
        public Animated(URL url, double scale) {
            image = new ImageIcon(url).getImage();
            this.scale = scale;
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Insets insets = getInsets();
            Graphics2D g2 = (Graphics2D) g.create();
            g2.translate(insets.left, insets.top);
            g2.scale(scale, scale);
            g2.drawImage(image, 0, 0, this);
            g2.dispose();
        public Dimension getPreferredSize() {
            Insets insets = getInsets();
            int w = insets.left + insets.right + (int)(scale*image.getWidth(null));
            int h = insets.top + insets.bottom + (int)(scale*image.getHeight(null));
            return new Dimension(w,h);
        public static void main(String[] args) throws MalformedURLException {
            URL url = new URL("http://members.aol.com/royalef/sunglass.gif");
            final JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new Animated(url, 2), BorderLayout.NORTH);
            f.getContentPane().add(new Animated(url, 1), BorderLayout.SOUTH);
            f.pack();
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }Or you could explicitly extract the images from the animated gif and
    resize them individually. The sample code here does the extraction:
    http://forum.java.sun.com/thread.jspa?forumID=20&threadID=500348

  • Animated Gif on problems when published

    Hi, Can anyone help?
    I've imported an animated gif and used it on my stage but
    when I publish it it doesn't work on a webpage and says that the
    Gif is missing.
    Does anyone know how to solve this problem?
    Thanks

    Hi, Can anyone help?
    I've imported an animated gif and used it on my stage but
    when I publish it it doesn't work on a webpage and says that the
    Gif is missing.
    Does anyone know how to solve this problem?
    Thanks

  • Animated GIF loop problem

    I have created a simple roll over effect using an animated
    GIF over 10 frames in Fireworks which increases the fill opacity of
    a button on mouse over. I set the loop to 1 so that the animation
    will play the 10 frames and then stop, but when i export to
    Dreamweaver and preview in browser the loop will not stop.

    I think this is an oversight in functionality.
    I also was never able to get the 'stop' to work.
    h

  • Animated gif color help

         Hello, I shot a sequence of photos for a stopmotion and have been having issues with color.  It was shot on a green screen and so I used keylight to remove it, made the sequence, it all looks fine in AE, render it and when I open it afterward, the colors are off and pixelated and just terrible. I've tried both web and system colors and am just lost. The adobehelp site says that you can make your own color palette in photoshop if you need it and so I made one, but when I browse for it in AE, it doesn't recognize the file. It's very frustrating. Please help!

    What exactly do you do? Sounds like you don't even understand how the GIF format (or any palette based format for that matter) works and what the limitations are and thus are using a completely wrong workflow. Anyway, you cannot load custom swatches/ palettes in AE, since it doesn't have an indexed color mode. Futile exercise. For the rest: Render a normal Quicktime, AVI or image sequence, import it into Photoshop as a video layer. Then export via Save for Web and Devices or Device Central. Any palette adjustmens can best be done there.
    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.

  • Keynote 3: Transparent Animated GIF Problems

    I've been trying to get an animated GIF with a transparent background to run in Keynote, but it's giving some disastrous results.
    I produce the animation by rendering the frames as PNG (with alpha channel) in MegaPOV 1.2.1. Then I use the convert utility from ImageMagick 6.2.9 to make them into an animated GIF.
    When I drop the animated GIF into Keynote 3.0.2, the first frame shows fine (with transparency and all). But when I animate it, the background goes red (the main color in this particular movie) and some trace of the previous frames stays. It seems like:
    1. Rather than displaying the GIF frame-by-frame, each frame is getting layered onto the previous frames.
    2. Keynote doesn't like the alpha channel for some reason.
    Problem 1 is also present if I open the GIF in Preview (is that supposed to be the correct behavior of an animated GIF?). Problem 2 seems to be Keynote-specific.
    Any suggestions for a work-around on this? The animated GIFs work fine if rendered without the alpha channel, but it'd look so much better with transparency!
    iMac 2GHz Intel Core 2 Duo   Mac OS X (10.4.9)  

    MegaPOV doesn't have a GIF output option. The choices are PNG, Targa, PPM, and hdr (not familiar with that last one). I don't know if PPM even has alpha-capability.
    So in some way, I have to convert PNG to GIF. The tools I have to do this are ImageMagick and Gimp. I tried them both, then viewed the results using several programs. Results are tabulated below -- (1) means that problem 1 from above was apparent (ie, parts of the previous frames were visible under the current frame); (2) means that problem 2 was visible (ie, the transparent parts took on some background color).
    If I didn't know how to change the default white background in the program, I couldn't tell whether problem (2) occurred, since the movie made with Gimp had a white background in Keynote.
    Using ImageMagick 6.2.9 to convert PNG->GIF and animate GIF:
    * viewing with Safari 2.0.4 : (1), can't tell for (2)
    * viewing with Preview 3.0.9 : (1), can't tell for (2)
    * viewing with Firefox 2.0.0.3 : (1)
    * viewing with Keynote 3.0.2 : (1), (2) -- alpha goes red
    Using Gimp 2.2.11 to convert PNG->GIF and animate GIF:
    * viewing with Safari : (1), can't tell for (2)
    * viewing with Preview : (1), can't tell for (2)
    * viewing with Firefox : (1)
    * viewing with Keynote : (1), (2) -- alpha goes white
    I only converted the first few frames using Gimp, since I was doing it by hand.
    All of this makes me wonder whether I'm dreaming the impossible, since problem (1) is universally present. It also makes me pretty sure that problem (2) is Keynote-specific.
    If there are any other tools that will convert/animate GIFs on a modern Mac, I'd love to hear about them. My UNIX-y tools seem to be failing me here. The Mac tools I remember from "back in the day" -- GIFBuilder and GIFConverter -- seem to have been abandoned around the beginning of Mac OS X. GIFBuilder won't even load my files, and GIFConverter still lacks alpha support in PNG.

  • Animated Gif Problem

    Greetings
    I would appreciate some help.
    I am new at creating animated gif's, and am experiencing a
    problem with them when I try to view them in a browser.
    I am working in Fireworks 2004, the following is what I do.
    Create first frame.
    Insert simple arrow.
    Create second frame
    Insert simple arrow with diffrent color
    Third frame same but diffrent image.
    Set the Optimize Panel to Animated Gif, transparency set to
    No tranparency.
    Click on File, Export.
    Type the name of the file in File Name box.
    Select "Frames to Files" option for Save as type option.
    In my folder where I saved the files there are now three gif
    files.
    When I open the file into the following browsers IE 7, 6.0 or
    Firefox it remains as a static image in the browser with no
    animation, the same is for viewing it in Window Explorer Preview
    Pane.
    In Fireworks however the animation plays perfectly.
    I would really appreciate it if someone could tell me what I
    am doing wrong or why they created animated gifs are not playing in
    the browser.
    Regards
    Dave

    Instead of Frames to files on export, select Images only.
    that should do it -
    alex
    revbear wrote:
    > Greetings
    >
    > I would appreciate some help.
    >
    > I am new at creating animated gif's, and am experiencing
    a problem with them
    > when I try to view them in a browser.
    >
    > I am working in Fireworks 2004, the following is what I
    do.
    >
    > Create first frame.
    > Insert simple arrow.
    > Create second frame
    > Insert simple arrow with diffrent color
    > Third frame same but diffrent image.
    >
    > Set the Optimize Panel to Animated Gif, transparency set
    to No tranparency.
    >
    > Click on File, Export.
    > Type the name of the file in File Name box.
    > Select "Frames to Files" option for Save as type option.
    >
    > In my folder where I saved the files there are now three
    gif files.
    >
    > When I open the file into the following browsers IE 7,
    6.0 or Firefox it
    > remains as a static image in the browser with no
    animation, the same is for
    > viewing it in Window Explorer Preview Pane.
    >
    > In Fireworks however the animation plays perfectly.
    >
    > I would really appreciate it if someone could tell me
    what I am doing wrong or
    > why they created animated gifs are not playing in the
    browser.
    >
    > Regards
    > Dave
    >
    >

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problems playing animated gif on label again

    I have program that is displaying a graphic representation of a wave file this is a cut down of it. I am using a mouse listener to detect the mouse wheel and from that I am zooming in on the wave graphic or zooming out.
    The problem is when I zoom in a Jlabel is displayed with an animated gif saying �zooming in� that work fine. But as soon as I zoom in again, the Jlabel will not display the image again or the zooming out image.
    I an new to java so be kind to my code
    Any help would be greatly appreciated
    CODE
    * DisWav1.java
    * Created on 30 April 2006, 14:43
    import java.awt.BasicStroke;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.geom.Line2D;
    import java.util.Vector;
    import javax.swing.JPanel;
    import javax.swing.JDialog;
    public class DisWav1 extends JDialog implements Runnable{
    // varables
         private Thread thread;
         public static final int MAX_PRIORITY = 10;
         Vector lines = new Vector();
         Color jfcBlue = new Color(204, 204, 255);
    Color pink = new Color(255, 175, 175);
    private Font font12 = new Font("serif", Font.PLAIN, 12);
    long mainSize = 36000;
    int holdingArray[];
    int ZOOMFactor;
         private JPanel jContentPane = null;
         * This is the default constructor
         public DisWav1() {
              super();
              initialize();
         * This method initializes this
         * @return void
         private void initialize() {
              this.setBackground(java.awt.Color.black);
              this.setContentPane(getJContentPane());
              this.setTitle("Display Wave");
    this.setSize(150,150);
    addMouseWheelListener(new java.awt.event.MouseWheelListener() {
    public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
    formMouseWheelMoved(evt);
         * This method initializes jContentPane
         * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setBackground(java.awt.Color.black);
                   jContentPane.setLayout(new BorderLayout());
              return jContentPane;
         public void run()
    }// end run
    public void start() {
    thread = new Thread(this);
    thread.setName("Display Graph");
    thread.setPriority(MAX_PRIORITY );
    thread.start();
    }// end start
    public void stop() {
    if (thread != null) {
    thread.interrupt();
    thread = null;
    }// end stop
    // Create a array for drawing ines on screen in scale.
    public void moveMe(int x, int y){
    this.setLocation(x,y);
    // used to detect when the mouse is wheel is move and then
    // zoom IN or OUT
    // also display jLabel with animated gif saying "zooming in" or "Zooming out"
    private void formMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
    javax.swing.JLabel zz;
    zz = new javax.swing.JLabel();
    zz.setBounds(this.getWidth()/2, this.getHeight()/2, 140,40);
    zz.setText("");
    getContentPane().add(zz);
    int notches = evt.getWheelRotation();
    if (notches < 0) {
    getContentPane().add(zz);
    zz.setIcon(new javax.swing.ImageIcon("zoomingin.gif"));
    zz.setBounds(this.getWidth()/2-(zz.getWidth()/2), this.getHeight()/2-(zz.getHeight()/2), 140,40);
    System.out.println("zoom up " + ZOOMFactor);
    ZOOMFactor = ZOOMFactor +2;
    } else {
    if (ZOOMFactor <= 0 )
         ZOOMFactor = 1;
    else{
    getContentPane().add(zz);
    zz.setIcon(new javax.swing.ImageIcon("C:zoomingOUT.gif"));
    zz.setBounds(this.getWidth()/2-(zz.getWidth()/2), this.getHeight()/2-(zz.getHeight()/2), 140,40);
    ZOOMFactor = ZOOMFactor - 2;
    System.out.println("zoom down " + ZOOMFactor);
    public void paint(Graphics g) {
    // paints lines form a vector here on the screen
    }// end of paint method
    }// end class disWav1
    // END CODE

    think ive solved it

  • Problem with animated .gif

    I have a problem with animated gifs. So if I set a animated gif as background and a button is over it as in the example below, then everytime the animation goes on the button disappears until I go over it with the mouse. So what can I do to solve this?
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    public class FrameBackImage {
              public static void main(String args []){
                   final JFrame frame = new JFrame("Frame");
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   frame.setSize(400, 400);
                   frame.setResizable(false);
                   frame.setLayout(null);
                   java.net.URL imageURL = ImageApp.class.getResource("animatedw.gif");
                   ImageIcon imageIcon = new ImageIcon(imageURL);
                 final JLabel label = new JLabel(imageIcon);
                 label.setBounds(0,0 , 400, 400);
                 frame.getLayeredPane().add(label);
                 JButton button = new JButton ("Exit");
                 button.setBounds(200, 129, 60, 60);
                 button.setBackground(Color.black);
                 button.setForeground(Color.white);
                 frame.add(button);
                 button.addActionListener(
                 new ActionListener(){
                        public void actionPerformed(ActionEvent arg0) {
                             System.exit(0);
                 frame.validate();
                  frame.setVisible(true);
    }

    In the future, Swing related questions should be posted in the Swing forum.
    Your usage of the getLayeredPane() method is something I've never seen before, so I don't know if thats the problem or not.
    How to display a "background image" is asked all the time in the Swing forum. So to familiarize yourself with the forum you can try searching the Swing forum. Using the keywords I highlighted would be a good place to start.

  • Quality problem with animated gif through flash

    i got a problem with making animated gif through flash.
    on html/swf publication it looks clear.
    but the weird thing is through gif publication, it wouldn't show. and exporting it as a movie as gif cause visual defect when put up on web.
    it looks better when you open it in a browser.
    this is how it looks for a profile gif in thumbnail mode. blocky and unclear.
    how do you get it to look good both in thumbnail mode and in browser mode. i seen other that have a clear gif in thumbnail mode.  are my setting wrong for flash? or should i just do gif in photshop instead. i heard rumors flash don't do gif very well.

    Change your gif export setting under publish...
              Dimensions         : Match movie
              Playback             : Animated
                                        : Loop continuously
              Options               : Optimize colors
                                        : Smooth
              Transparent         : Opaque
              Dither                 : None
              Palette Type       : Adaptive
              Max colors         : 99999

  • Having problems when exporting .swf file as an animated gif

    Hi:
    I was wondering if anyone has ever had any issues exporting a
    flash file as an animated gif? When I do so, the image quality is
    very compromised and the animation is distorted. I know this is not
    very specific question, but I have never encountered this issue
    before, and I am trying to help a co-worker. I don't understand why
    it looks exactly the way we want it to look as an swf file, but not
    as an animated gif? Can anyone point me in the right direction as
    to what to look for as the potential source of this problem? I have
    the swf file, although this would not be very helpful as I don't
    have access to the flash file (but I can send it to you if that
    would help). We tried unchecking the feature to optimize the image,
    and changed the color pallete to adaptive, but this didn't solve
    the problem. I also tried removing any unnecessary layers prior to
    the export. Basically, I'm not sure as to how to proceed and what
    may be causing the problem. I also want to mention there is a
    placed image on the stage. Could the type of image placed be
    causing the problem when exporting to a gif file, but not as a
    .swf? If anyone could help, I would really appreciate it! Thanks.
    Sara

    I also wanted to mention that the swf file uses sound. I am
    reading an old book that I have on Flash and it's saying that Flash
    and Shockwave Flash enter a special mode when they encounter a
    stream sound in which the animation is forced to keep up with the
    sound track, if the animation frames can not be drawn quickly
    enough, some frames are skipped. I am also reading that the
    animated gif format does not support sound. Again, the only
    reference I have is for a very old version of flash, and I'm not
    sure it applies to CS3. I am now just thinking that the sound may
    be the issue.

  • Problems/help with animated GIF exports

    I am an experienced Photoshop user.  I recently upgraded to CS5 (Windows) and have been attempting to produce animated gif files. 
    After reading a few tutorials on the topic, I have been able to: 
    Create a PSD with a few jpg images as layers; 
    Move the layers to the animation window; 
    Set the cycle times and optimize the animation window; and, 
    Use the Save for Web Devices dialog to create the GIF file. 
    Everything appears to be normal throughout this process.  However, the exported GIF file appears as a dark gray frame when I open it in IE, or upload it to my image hosting site. 
    Anybody else experiencing this type of problem? 
    Thanks 

    No, my Photoshop CS5 saves animated GIFs just fine, and I did just what you said.  For example (you have to click on an image here to see it animate):
    Can you post your image here?  Maybe it could be a problem with your browser not animating the image properly?  What version of IE do you use?
    -Noel

  • Problem saving animated gif

    Hello!
    Just for fun i was planning to edit a animated football tackle gif. I was planning to remove the player who tackle in each and every frame of the animated gif. So it would take some time to finish.
    I have successfully opened the gif in CS6 via import Video Frames to Layers.
    It consists of 72 layers and i have tried to fix 10 of them just to see how it roughly would look like.
    My problem comes when I try to save and render the GIF (via save for WEB).
    The 10 first frames of my gif only shows one freezing frame, and then it shows the rest from 11-72 without any problems.
    What am i doing wrong, since my edited layers don't show up in the final GIF?

    Right on! Easy solution.
    First, the reason your first 10 frames are not changing is because each of those frames shows the same layer (Layer 1).
    In your layers panel, you have Layer 1 set to visible and all the other layers are invisible. That's good for Frame 1, but for frame 2 you'll want to make Layer 2 the visible one.
    Click on Frame 2 in your Timeline panel and then check the eyeball icon to make Layer 2 visible! Do the same for Frame 3/Layer 3, Frame 4/Layer 4, etc. until you get to the end of the animation!
    To address the second problem, the option for Make Frames from Layers is greyed out because you already have frames in your timeline.
    Go to your Timeline panel and select all the frames and delete them.
    Then select all your layers in the Layer panel, right-click and choose Make Frames from Layers... you should be able to click on it once your Timeline is cleared. It will automatically create frames that go from Layer 1 to your last layer (so, you wouldn't have to do it manually like above ^).
    Either way should take care of your problem! Please let me know if this works for you!!
    Cheers,
    Michael

Maybe you are looking for

  • SUBMIT rkaep000 in background

    Hi Guru's, I've created a selection wirh differents parameters : 1)Controlling area - KOKRS 2)Partner Object -PAROB 3)Posting date - BUDAT 4)Debit TYPE-BELTP 5)Business Transaction - VRGNG I try to pass those parameters in background to the report rk

  • DKA790GX post problem

    I have read through the forum to try and find an answer to my problem with no luck. I just purchased and received the DKA790GX along with a Phenom 3.0Ghz x4 and 8 Gigs of 1066 RAM (Kingston). I paid for half the ram, the cpu and mainboard to be teste

  • Use of CS operator in SELECT... WHERE clause not allowed

    Hi all gurus, quite a dumb question, but since I'm facing the issue... I need to access a standard DB table with some selection criteria , in particular I'd like to extract all the entries where the field NAME contains a specific substring. Since the

  • Safari is showing everything greyed out and locked, how do I change that?

    I'm having a problem where Safari periodically locks and greys the screen.  It  wil continue to update / refresh but I can't inter act with it.  The onjly way I've been ab l to clear this is to reset my ipad.  Obviously dont want to keep doing that a

  • Cleaning temp files

    Hi, we have developed a CWS for 4.5WS. When the crawler runs, a number of temporary files are created in a folder for indexing purposes, and everything works fine. The question is: when can I delete these temp files? In the ContainerProvider.shutdown