Problem at displaying animated gif images !!!!!!!!!!!!

hello everyone......i am trying to display an animated gif image..............so till far i have no issues on this....
but i face problem when :
i have created a class called SimpleGame which extends JPanel....
public class SimpleGame extends JPanel
//code
public void paintComponent(Graphics g)
//code to draw image
}now i have written another class with main method
public class MyGame extends SimpleGame
public MyGame()
        JFrame frame=new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(800, 600);
        frame.setUndecorated(true);
        frame.setLocationRelativeTo(null);
        frame.getContentPane().add(this);
        frame.setVisible(true);
        this.repaint();
}so image gets displayed but only one frame of animated image......image that is displayed is static.....since it is a animated gif,,,,,so some how animation is not rendered......only one frame is displayed......
why is it happening ??
if i try to display animated image from a single class i mean my paintComponent method and main method is at same class then i do not face problem.....
but if my paint method is in another class and i am using that method from another class then animation does not get rendered.........
any help !!!!! please...........

class SimpleGame extends JPanel
Image img=new ImageIcon("y.gif");
public void paintComponent(Graphics g)
g.drawImage(img,150,150,this);
}main class//
class MyGame extends SimpleGame
public MyGame()
        JFrame frame=new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(800, 600);
        frame.setUndecorated(true);
        frame.setLocationRelativeTo(null);
        frame.getContentPane().add(this);
        frame.setVisible(true);
        this.repaint();
public static void main(String[] args)
new MyGame();
}my image gets displayed.......but only single frame of a animated image....animation is not happening..........

Similar Messages

  • Problem to display Animated Gif from HTML into JEditorPane

    I have a problem displaying animated gif that comes from URL (HTML) into JEditorPane.
    Let me show you the source I have:
    * @author Dobromir Gospodinov
    * @version 1.0
    * Date: Dec 6, 2002
    * Time: 6:47:53 PM
    package test.advertserver;
    import javax.swing.*;
    import java.awt.*;
    import java.io.IOException;
    public class Test {
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              JEditorPane ed = new JEditorPane();
              try {
                   ed.setPage("http://localhost:8200/servlet?key=value");
              } catch (IOException e) {
                   e.printStackTrace();
              JPanel panel = new JPanel();
              panel.setPreferredSize(new Dimension(500, 500));
              panel.add(ed);
              frame.getContentPane().add(panel);
              frame.pack();
              frame.setVisible(true);
    }Part of the returned from servlet HTML includes an img tag:
    <img src="/images/MyAnimatedGif.gif" alt="animated gif comment" width="480" height="50"  border="0">Let us assume that MyAnimatedGif.gif has 10 frames and gif is looped - when the 10th is dipslayed it has to display the 1st and so on.
    JEditorPane displays frames from 1 to 10 correctly but does not start from the first again. Instead JEditorPane displays a broken image.
    I locate where the problem arise:
    JEditorPane has an HTMLEditorKit that creates javax.swing.text.html.ImageView instance for every IMG tag.
    And here is the problem:
    ImageView has an ImageObserver necessary for the asynchronous image download. ImageObserver has the imageUpdate method. But this imageUpdate method is never called with ALLBITS flag raised up. Instead, after the last frame of MyAnimatedGif.gif is downloaded the imageUpdate method is called with flag ERROR raised up. Obviously this is a bug of Sun's implementation. Finaly the flag ALLBITS has to be received for normal end of image observing. But ALLBITS flag does not come.
    So, can anybody help me how to load an animated gif within JEditorPane completely.
    Thank You in advance,
    Dobromir Gospodinov
    P.S. If somebody of you wants to debbug what happens within ImageView will have to implement it (and related classes too, because of the limited package visability) borrowing the source from Sun's ImageView.

    I'm also having this problem with java 1.4.1 I discovered that some animated gifs work fine, while others stop animating. Running with java 1.3.1 fixed the problem. I'm going to report this as a bug
    Here's my code:
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    public class AnimatedGifTester
    extends JFrame
    public static void main(String argv[])
    throws Exception
    new AnimatedGifTester();
    public AnimatedGifTester()
    throws Exception
    String[] images = new String[] {
    "http://www.gif.com/ImageGallery/Animated/Animals/Photographic/dog_running.gif",
    "http://www.gif.com/ImageGallery/Animated/Characters/Cartoon/java.gif",
    "http://www.webdeveloper.com/animations/bnifiles/anielg.gif",
    "http://www.webdeveloper.com/animations/bnifiles/cat2.gif",
    "http://images.animfactory.com/animations/animals/fish/big_fish_swimming_md_wht.gif",
    "http://www.webgenies.co.uk/images/martian.gif",
    "http://www.webdeveloper.com/animations/bnifiles/at_sign_rotating.gif",
    "http://www.webdeveloper.com/animations/bnifiles/arrow_1.gif",
    "http://www.gif.com/ImageGallery/Animated/Characters/Cartoon/javaacro.gif",
    "http://java.sun.com/products/java-media/2D/samples/suite/Image/duke.running.gif",
    "http://www.gif.com/ImageGallery/Animated/SouthPark/Cartoon/stan.gif"
    StringBuffer buffer = new StringBuffer("<html><body>");
    for (int idx = 0; idx < images.length; idx++)
    buffer.append("<img src='" + images[idx] + "'>");
    buffer.append("</body></html>");
    String html = buffer.toString();
    // save a copy of the html to open in a browser so we can see what it's
    // supposed to look like
    BufferedWriter writer = new BufferedWriter(new FileWriter("animatedGifTest.html"));
    writer.write(html);
    writer.close();
    JEditorPane editorPane = new JEditorPane("text/html", html);
    editorPane.setEditable(false);
    getContentPane().add(editorPane);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setSize(new Dimension(400, 600));
    show();

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

  • I have a problem with an animated gif.

    I have a problem with an animated gif. When I use text in the
    flash file the gifs text is all messed up. The text was white in
    the flash file but in the gif all the white is splodged all over
    where the text was supposed to be and is totally inelegable.

    OK I found a way around this problem... I delete all the text
    that I had created within Flash and recreated it in Photoshop. I
    rasterized the type in Photoshop the I saved the files as PSD. I
    then went in to Flash and imported them to the library. I place the
    images of the text where they had originally been in my Flash file.
    When I published it as an animated GIF the file was perfect... No
    Black or White blocks...
    SO you might try that... I'm not sure what Flash changed, but
    I used to create text for animiated gif before without any
    problems...

  • Problem in loading animated gif

    I have problem in loading animated gif with ClassLoader. Here is the code:
    ClassLoader loader=this.getClass().getClassLoader();
    URL res = loader.getResource(name);
    if (res!=null) {
    ImageIcon icon = new ImageIcon(res);
    if (icon != null) {
    Image image = icon.getImage();
    if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
    images.put(name,image);
    return (Image) image;
    } else {
    System.out.println("Failed to load "+name+" error "+icon.getImageLoadStatus());
    images.put(name,"");
    Only when the gif is an animated gif, I get error message: Failed to load and icon.getImageLoadStatus() returns 2. Otherwise, it works.
    Anyone encounters the same problem as me?

    I think the problem is the asynchronous loading of the gif.
    when you call f(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
    I think it is comming back MediaTracker.LOADING .
    for an animated gif, it may not come back COMPLETE until after running thru
    the whole automation. instead you could just check:
    (icon.getImageLoadStatus() != MediaTracker.ERRORED)

  • Animated GIF Image on a JPanel.

    How can I display an animated GIF image on a JPanel? It should animate after displaying.
    Regards

    I think this code should display an animated GIF image on a JPanel.
    -Mani
    import javax.swing.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.*;
    public class Animation {
    public static void main(String args[]) {
    JLabel imageLabel = new JLabel();
    JLabel headerLabel = new JLabel();
    JFrame frame = new JFrame("JFrame Animation");
    JPanel jPanel = new JPanel();
    //Add a window listner for close button
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    // add the header label
    headerLabel.setFont(new java.awt.Font("Comic Sans MS", Font.BOLD, 16));
    headerLabel.setText("Animated Image!");
    jPanel.add(headerLabel, java.awt.BorderLayout.NORTH);
    //frame.getContentPane().add(headerLabel, java.awt.BorderLayout.NORTH);
    // add the image label
    ImageIcon ii = new ImageIcon("d:/dog.gif");
    imageLabel.setIcon(ii);
    jPanel.add(imageLabel, BorderLayout.CENTER);
    frame.getContentPane().add(jPanel, java.awt.BorderLayout.CENTER);
    frame.pack();
    frame.setVisible(true);
    }

  • Where can I find video training to make animated GIF images?

    I would like to get more info on how to make animated GIF images with my Photoshop for my WordPress blog here  http://www.getfreewordpressthemesnow.com

    Hello Bill,
    you could have a look at http://helpx.adobe.com/photoshop/using/creating-frame-animations.html >>> ... till save the animation
    and at the end: Adobe also recommends >>> http://helpx.adobe.com/photoshop/using/saving-files-graphics-formats.html#save_in_gif_form at
    If the German language is no problem for you, you could use http://praxistipps.chip.de/photoshop-animiertes-gif-erstellen_1485
    Hans-Günter

  • Animated Gif Image does not render correctly on screen

    I have added animated gif image to the scene it does not render correctely.it shakes on the screen. plz give me any suggestion
    i use following code
    Image logo= new Image(getClass().getResourceAsStream("images/image.gif"));
    logoLabel.setGraphic(new ImageView(logo));

    Hello user,
    I think gif are rendered smoothly.
    Are you sure you are not making many object of same images everytime?
    Thanks.
    Narayan

  • Animated gif image

    Hi
    I like to create an animated gif image from a given set of images with java. I like to do this with the given set of java api as I do not want to use a commercial graphics library. Can anyone provide me with a sample example.
    Thanks

    Hi
    I like to resize a gif image. Currently i am using the following code but the resized image is not smooth.
    public BufferedImage resizeImage(BufferedImage img, int newW, int newH)
              int w = img.getWidth();
              int h = img.getHeight();
              BufferedImage dimg = new BufferedImage(newW, newH, img.getType());
              Graphics2D g = dimg.createGraphics();
              g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
              g.drawImage(img, 0, 0, newW, newH, 0, 0, w, h, null);
              g.dispose();
              return dimg;
    Is there a way to resize a gif image in a smooth way as the example given in the gif4j library
    Thanks

  • How combine a jpeg image & animated gif image & save  it as GIF ?

    i have an jpeg image, & also aminated gif image, how do i place the animated gif image over (in the center of the image) a jpeg image & save it as gif file ??

    First thing you need to do is stop thinking in terms of file formats once the files are in photoshop they are all the same. The exception being vector vs raster. But in this instance the process is rteally the same so 6 on one hand a half a dozen on the other. Or as some would say Tomatoe, tomahtoe(mispelled on purpose).
    The jpeg I would assume is the background image and the gif image is the fore ground object. Open the jpeg, and then place the gif file. As long as the fore ground object has transparency, your job is pretty much done. If not, then it will be up to you to mask what you want to keep vs what you don't and apply that selection to the foregrounds layer as a mask.
    Google the net or skim the users manual for the keywords - mask, selections, quickmask, pen tool, paths. Each of these can in one way or another take care of your issue.
    It would be worth your time to also go through the numerous videos about photoshop and see how its done.
    Either go to adobe tv,
    Itunes podcasts
    or one of the following web sites:
    http://kelbytv.com/
    http://creativesuitepodcast.com/

  • Animated gif images not working, n73 problem pleas...

    my phone is n73music. when i try to use animated or gif images as wallpapers, the images are not moving as they should do in standby mode on the display. what could be the problem, please advice. thankyou.

    Sorry, N73/ME is a s60 phone and s60 doesnt support moving animated GIG, PNG file format as wallpaper

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

  • фф тормозит при выводе анимированных gif картинок (google.trnslt - FF inhibits the derivation of animated gif images)

    если выводить анимированные картинки одну за другой(примерно так - &lt;a onclick="smiley(':yes:'); return false;" href="#"&gt;&lt;img src="/engine/data/emoticons/yes.gif" alt="yes"&gt;&lt;/a&gt; - и так повторить раз 100, с разными смайлами), то ФФ начинает дико лагать, замедляется как работа самого фф(конкретно на этой вкладке), так и анимация картинки
    нашел единственный способ этого избежать - каждую картинку вставить в ячейку таблицы, но это плохой вариант решения проблемы, т.к. ограничивает возможности верстки. да и вообще это не вариант, т.к. проблема явно не в верстке, а в самом ФФ.
    ОЧЕНЬ тормозит!!! загрузка ЦП поднимается до 25%(intel q6600, 4gb, 570gtx)
    &lt;div&gt;&lt;a&gt;&lt;img&gt;&lt;/a&gt;&lt;/div&gt; - не помогает<br />
    &lt;div&gt;&lt;div&gt;&lt;a&gt;&lt;img&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt; - не помогает
    Google.trnslt:
    if display animated pictures one by one (like this - &lt;a onclick="smiley(':yes:'); return false;" href="#"&gt; &lt;img src = "/ engine / data / emoticons / yes.gif "alt =" yes "&gt; &lt;/ a&gt; - and so once again 100, with different emoticons), the FF began wildly lag, slowing the work of the FF (specifically on the tab), and animation pictures
    found the only way to avoid this - every image inserted into a table cell, but it is a bad solution to the problem, because limits the possibility of imposition. and generally is not an option because problem is clearly not in the layout, but in the FF.
    VERY slow! CPU usage rises to 25% (intel q6600, 4gb, 570gtx)
    &lt;div&gt; &lt;a&gt; &lt;img&gt; &lt;/ a&gt; &lt;/ div&gt; - does not help<br />
    &lt;div&gt; &lt;div&gt; &lt;a&gt; &lt;img&gt; &lt;/ a&gt; &lt;/ div&gt; &lt;/ div&gt; - does not help

  • How to use an animated .GIF image as the texture in Cp4 ?

    Hello all
    I wish to create an animated banner and use it as the texture in Captivate 4.
    As I know texture supports only image formats( JPEG, PNG, GIF,etc). So, I have created a small animation in Photoshop and saved in GIF format and used it as the texture. But when I preview the movie it is displayed as an image but not the animation.
    Is there any solution for this problem?
    Kind regards,
    Kartik Pullela

    1. Instal this package: http://nugetmusthaves.com/Package/WpfAnimatedGif2. Use the code below:
    <Window x:Class="WpfAnimatedGif.Demo.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:gif="http://wpfanimatedgif.codeplex.com"Title="MainWindow"Height="350"Width="525"><Grid><Image gif:ImageBehavior.AnimatedSource="Images/animated.gif"/></Grid>I found this on: http://wpfanimatedgif.codeplex.com/, and this is the useful solution because <MediaElement /> doesn't show the .gif image, and that's pretty strange.

  • 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

Maybe you are looking for

  • How Create Virtual Directory On Oracle Application Server 10g on RHEL 5

    Dear Sir i have deployed my application on OAS 10g on RHEL 5 ,,now since my application is calling some pro*c programs and then they generate some text based reports on fixed folder named /treas/temp now i simply have to open these text based reports

  • I am trying to install the quicktime player 7 pro and I do not have my install dvd what do I need to do?

    I am trying to install the Quick Time Player 7 pro upgrade and I need the install dvd I do not have the dvd ...I know my apple is old but I have no idea where that dvd is. how can I work around this?

  • ICal iPhone Sync Issue... Bug?

    I have many repeating events in my calendar. I often have to change the time of one of the events in the string. I seem to have major problems when I do this either in iCal on my Mac or in the iPhone. When I sync I end up with deleted events, duplica

  • Sync problems with my ipod touch

    My ipod is 2 weeks old. syncing with my PC worked fine until yesterday when I put a CD into itunes and tried to sync it with my ipod. No sync high lighted therefore it wont sync can anyone help ?

  • Questionnaires

    In CRM 5.0 we are displaying a Survey in the FollowUp Viewset. Eventhough the survey has been filled completely, we keep getting this error "Questionnaire (something) is not yet filled". Has anyone faced this before ? Edited by: Krish on Jun 2, 2008