Animation /animated gifs

hi all
i was trying to use animated gifs in a game. The problem comes when I run the animated gif. The previous images of the gif remain on the screen. When I use any imaging software to view the animated gif it comes up correctly. My first question is it a problem with my animated gif or do I need to do something in Java. if the answer is I need to do something in java, could someone please help and tell me what I need to do.

you could of always said.....
save the animated gifs as individual gifs and cycle through them in the code?
probably been easier, no?

Similar Messages

  • Animated snow GIF

    I am trying to create a simple animation of snow falling.
    This will be
    in front of a mountain scene that I have already created. Can
    anyone
    point me to a tutorial on how to create a snow effect? Flash
    doesn't
    seem to be an option because I want this to be a gif that I
    can tile
    horizontally across the top of a web page. Is there any way
    other than
    manually animating all the flakes over all of the frames? My
    other
    obstacle is that with each successive frame there needs to be
    "new" snow
    coming down again from the top.
    I'm having a VERY long morning trying to figure this out.
    Thanks in advance.
    David

    On 02 Jan 2008 in macromedia.fireworks, David G. wrote:
    > I am trying to create a simple animation of snow
    falling. This will
    > be in front of a mountain scene that I have already
    created. Can
    > anyone point me to a tutorial on how to create a snow
    effect? Flash
    > doesn't seem to be an option because I want this to be a
    gif that I
    > can tile horizontally across the top of a web page. Is
    there any way
    > other than manually animating all the flakes over all of
    the frames?
    > My other obstacle is that with each successive frame
    there needs to
    > be "new" snow coming down again from the top.
    Check back a week or so for Project Seven's Christmas
    greeting. They use
    animated snow as a background.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

  • Flash animated text gif viewed in Fireworks

    CS3 flash text saved as gif animated and viewed in firework
    text is display as a big dark blob. Is there a way to type the text
    so it can be shown clearly and viewed in fireworks without the blob
    as an animated gif. Is thre a better way to do this?

    quote:
    When I create a short flash with text inbeded and I publish
    the fla as a gif my text does not display clearly like the swf,
    when I view the created gif in fireworks animation, my text looks
    like big glob not as a text.
    Is there a reason you need to make a gif animation instead of
    using a .swf?
    m.

  • Animating a .gif across the page.

    Hi,
    See my site www.justinmettam.com I want to animate a flock of
    birds across the sky from left to right.
    Should this be done in Flash or can it be done with
    Dreamweaver ?
    I am hoping that it is possable to have a animated gif of a
    bird flying and then move that image across the screen then repeat
    this several times to create a flock of birds, can this be done
    with out Flash ?
    Justin.

    Search DW's Help for "Timeline". It has a somewhat checkered
    past, but
    will do just what you are asking for without Flash.
    emichael brandt
    mettam wrote:
    > Hi,
    > See my site www.justinmettam.com I want to animate a
    flock of birds across the
    > sky from left to right.
    > Should this be done in Flash or can it be done with
    Dreamweaver ?
    > I am hoping that it is possable to have a animated gif
    of a bird flying and
    > then move that image across the screen then repeat this
    several times to create
    > a flock of birds, can this be done with out Flash ?
    >
    > Justin.
    >

  • Animation of .GIFs

    Hi,
    I currently have three classes, and gutted to only have the important parts, they are the following:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.Image;
    public class EntryPoint extends JFrame
        public EntryPoint () throws InterruptedException
            getContentPane ().add (new MainControl ());
            setSize (807, 831);
            setVisible (true);
            setDefaultCloseOperation (EXIT_ON_CLOSE);
            setLocationRelativeTo (null);
            setResizable (false);
        public static void main (String[] args) throws InterruptedException
            new EntryPoint ();
    public class MainControl extends JPanel implements Runnable
        Thread t;
        public static int delay = 4;
        private Player player1 = new Player ();
        public MainControl ()
            t = new Thread (this);
            t.start ();
            setSize (800, 800);
            setFocusable (true);
        public void run ()
            long tm = System.currentTimeMillis ();
            while (true)
                repaint ();
                try
                    tm += delay;
                    Thread.sleep (Math.max (0, tm - System.currentTimeMillis ()));
                catch (InterruptedException e)
                    break;
        public void paint (Graphics g)
            super.paint (g);
            Graphics2D g2 = (Graphics2D) g;
            RenderingHints rh = new RenderingHints (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setRenderingHints (rh);
            player1.drawPlayer (g2);
            g.dispose ();
    public class Player
        private Image playerRunRight = Toolkit.getDefaultToolkit ().getImage ("GreenRunRight.gif");
        public void drawPlayer (Graphics2D g)
            g.drawImage (this.playerRunRight, 50 , 50, null);
    }I used this same method before and it worked pretty much flawlessly. After adding things that did not really affect the drawing of the image, the image no longer plays. Also, in the full program I have if statements around image drawing statements so it knows when to draw left, right, etc. I don't understand why this method used to work before but no longer. I have also uploaded the gutted version with the .gif and the entire project if anyone wants to look at it : P
    Also something important that I should add is that when it was working, it used to animate spontaneously and was machine dependent. Sometimes it would animate on my home computer and sometimes it wouldn't and this also applies to the computers at school. They both run Windows XP, so I don't think it is really affected by OS.
    Thanks for your help. Much appreciated.
    Here is only the image file, if necessary: http://www.mediafire.com/imageview.php?quickkey=zwn3z4nz5ug&thumb=4
    Here is the gutted version: http://www.mediafire.com/?jgmy5hmmgmx
    Here is non-gutted version: http://www.mediafire.com/?ecmtvxnymdd
    Edited by: ProgrammingNewb on Jun 10, 2010 1:57 PM

    Maxideon wrote:
    2. Thanks for that. Not sure what difference it will make but always good to follow standards and good programming practices.
    Edit: Changing paint to paintComponent makes it stop painting anything to screen. Weird...paint() calls paintComponent(). So including super.paint() within paintComponent will cause infinite recursion. You'll get a StackOverflowError anytime you try to paint the panel. So change paint to paintComponent and+ super.paint(g) to super.paintComponent(g);Also, only dispose graphic objects that you create. Don't dispose ones that are given to you.
    3. Alright, will try to implement and update if there are any changes to the behavior.
    Edit: No behavior in animation when it is read in through ImageIO.read ( File f)Since we're talking about an animated gif, it will be easier to stick with a Toolkit creation method. The way a gif normally plays out is by providing a non-null argument for the ImageObserver parameter of Graphics#drawImage.You currently provide null.
    g.drawImage (this.playerRunRight, 50 , 50, null);{code}
    Normally, you pass the Component for which the image is being drawn on.  The Component class implements the ImageObserver interface to just essentially call repaint() on itself for multi-frame gifs.  And so a loop is set up,
    Graphics#drawImage --> ImageObserver notified (the component) --> Component calls repaint() --> Graphics#drawImage --> ect...Alright changed the paint to paintComponent and got rid of the dispose at the end.
    Regarding the ImageObserver, I have a thread which calls repaint as well, so wouldn't calling it again from inside the paint method just get me stuck in a infinite loop where the image animates but nothing else can occur and shouldn't the thread do the same job as an image observer? As well, the Player class, which does the image drawing is handed a reference to the Graphics2D object, but does not extend a swing object that actually has a paint method. Therefore, I cannot implement an ImageObserver on it or the MainControl class since the main class does not actually call the draw image method. Sorry if I am misunderstanding this, haven't really read about ImageObserver but will search it up.
    Thanks for your help.

  • Animating a GIF from Photoshop for PC

    A friend sent me an animated photo she made for me on her PC using Photoshop. The best I can get it to do on Keynote is one movement, not continuous. Is there a solution? Thanks.

    Dan:
    Welcome to the Apple Discussions. Did you get the photos to edit from the Data folder in the iPhoto Library folder? I'm guessing you did. They would be the thumbnail files that iPhoto creates. The full sized files are located in the Originals folder. You do not want to edit the files in there directly with Photoshop without going thru iPhoto. And since PS is on the PC side of your Mac, you will have to do the following: is export the files you want to edit to the desktop and then get them into PS in Parallels.
    For a small fee, Adobe will convert your PC Photoshop license over to a Mac license if you so desired.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Problem to create animated gif using transparent frames

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

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

  • Animated gif background - Won't animate!

    I have a website which my partner and I have created. I'm really happy with what we have achieved EXCEPT I am trying to add an animated star gif background which is stationary even when I've published it. I've searched so many places for the solution that I'm now thoroughly confused as to if this is possible.
    The website is http://www.billieanthony.co.uk and I have added the animated gif to the welcome page only (black/blue stars) to see if it works (which to me doesn't). I added the gif via the page inspector layout section. The other pages only have a static background.
    Any comment gratefully received even if it's only to say it can't be done.
    Many thanks
    Kevin

    Step one to enable the community to help debug what you're encountering would be to provide the URL for the page where the GIF is being used. My first guess would be there are effects applied to the image (i.e. inner glow, bevel, etc.) that require Muse to re-encode the image and Muse does not support encoding animated .gif. It only supports passing animated .gif files through unchanged. (And to get an image to pass through unchanged it needs to have no effects that require rasterization applied in Muse.)
    Given you've stated the GIF file is 7.5Mb I have to question your choice of .gif. At 7.5Mb this single file will take ~8 seconds to download on the average US broadband connection and will be much slower for many broadband users and most cellular users. GIF is a reasonable choice for very small short animations used sparingly, but is seldom (if ever) a good choice for larger or longer animations. Better choices for those are to use a video or a tool like Edge Animate to create a HTML5/CSS3 animation. The end result will be vastly more user friendly in terms of page load performance.
    A huge percentage of first time visitors to a webpage will cancel the page load rather than waiting 8+ seconds for the page load to complete.

  • 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 on JButton is not working

    Hi all,
    I have a JButton, which is used as a 'search button'. I want my search button to show an animated globe gif when search is going on. I have my code as below.
    JButton searchButton = new JButton(MyUtilities.searchIcon());
    ImageIcon animatedGlobe = MyUtilities.animatedGlobeGif();
    searchButton.setPressedIcon(animatedGlobe );
    At runtime the button is showing a static globe which is not animating.
    Can any one please answer what could be the problem?
    Thanks in advance,
    amar

    Thanx Demanic ,
    I am doing swings for first time. Can you please tell me how to repaint the button using seperate thread?
    Thanks,
    amar

  • .gif animated files

    Hello to eveybody ! I'm a new subscriber and I have a problem : In my old owned PC I received and sent animated graphics .gif files using HTML formatted e mail messages with no problems. Now in my newbrand MacBook Pro the graphic looks animated by the sender but it looks static to me as recipient when I open the message or save/views it in My documents.
    After various attempts, I found out that if I open the .gif file with Safari.app, I can see it animated but from Safari.app I cannot either save or send it attached to an email message.
    Can someone help me ? Thanks a lot.

    Animated GIF files only show the animation when viewed using an HTML or similar viewing environment.
    Apple mail, AFAIK, only has composing options of text and rich-text and not HTML, so the animation will not show. However, the Gif will still contain the animation frames and should display properly when opened with Safari or other HTML viewer.
    I just sent myself an animated gif, and when I received the email, I right-clicked the gif and selected "open with" and chose Safari and the animation was correct.
    It's simply that the Apple email does not have HTML as one of its composing/viewing options.

  • 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

  • What can I do to add animated gif to my Button

    hi everybody,
    I have a JButton, which is used as a 'search button'. I want my search button to show an animated globe gif when search is going on. I have my code as below.
    JButton searchButton = new JButton(MyUtilities.searchIcon());
    ImageIcon animatedGlobe = MyUtilities.animatedGlobeGif();
    searchButton.setPressedIcon(animatedGlobe );
    /*******************************************************/At runtime the button is showing a static globe which is not animating.
    I used to be tipped that I use Thread to make the picture moving ! So, can you show me the way !
    Quin
    (same idea on amar)

    Plug your iPod into iTunes and look under its Summary tab.  There should be a colored bar towards the bottom indicating how much of each of content you have synced to your iPod including music and podcasts, etc.
    If your music is taking up a majority of the space on your Shuffle, you might want to double check their format.  You can do this by right->clicking on a song and choosing Get Info.  When the window pops up for it you should be under a tab that gives the track's format.
    B-rock

  • Fuzzy Edges on Animated Gif

    I created a very simple animation in Fireworks that loops to
    a closed circle. It's pixelated around the edges and also has a
    thin, pixilated white line around it. Does anyone know how to get
    rid of this? I used "index transparency" on my export settings and
    left the rest at default.

    Just came across this same issue in CS5.  Sometimes when you resize an image using the "Image size" function, Fireworks does not properly scale either the width or the height to the closest absolute pixel.  This creates a sub pixel which becomes apparent with exporting GIFs.  You can see the scaling issue if you throw  a 1 pixel solid hard edge border around your image: if you see a transparent gap on the outside of the border then you've got the issue & it's this that causes the GIF image to go blurry when exported.   The fix is to crop the image changing the canvas size to "absolutely" crop the image.
    Generally the animated Fireworks GIFs exports are a buggy part of an otherwise great web graphic design tool:
    both palettes not correctly mapping colour
    frame times can go heywire in complex documents with multiple pages and states
    the export of an animated gif with a document with multiple pages and states can generate redundant files.

  • How do I import animated gifs into Premiere with a transparent background?

    I have an animated gif that I got from the internet, and I'm trying to import it into Premiere Pro with a transparent background. The gif is of a video game character standing still and blinking. Whenever I import it, it always has a white background, so I need help on how to change that.
    I've gone into Photoshop and removed the white background frame by frame, making it transparent. I do this by using the magic wand tool to select the white background, then hit "delete" to turn it into that diamond grid, which means it's transparent. I then select File -> Save for Web. I preview every frame, and it shows that the backgrounds are transparent. I save it as a gif. But when I import it into Premiere Pro, the white background is still there.
    I've read many forums online about people trying to import images into Premiere Pro with a transparent background, but none of them have explained how to do it specifically for animated gifs. Every answer has always been "export the image as a png, that'll work", and sure enough, I exported a few frames of the gif as pngs, and those few frames had transparent backgrounds in Premiere Pro. But I don't want a png because those aren't animated sequences, those can only be still images. I need to export it as a gif so that it will remain animated, but gif files always have that dreaded white background in Premiere Pro.
    I suppose I could export every frame as a png, import each of those frames into Premiere Pro, then string all the frames together and tweak them so they'll be functionally identical to the animated gif, but that would take forever. I'm making a video project and I need numerous animated gifs to work with, so I don't want to do that with every single one of them. I'm looking for a way to simply import the gifs into Premiere Pro and be done with it. If there is any way to do this, please help me.
    -Robert

    faind on gif transparency and other cartoon animation problems : Adobe After Effects
    " The reason: GIFs don't support alpha channels. Instead, their file structure assigns a certain color value to be read as totally transparent. There aren't any degrees of transparency as you find in graphics formats that do support alpha channels.
    To use an animated gif in AE, you'd first have to create the areas of transparency, then convert the series of images into a graphics format that supports alpha channels, and there are a bunch: PICT, TIFF, TARGA or PNG, to name a few."

Maybe you are looking for

  • Exchange 2013 SP1 - healthsets failing

    Hi, I have recently installed two Exchange 2013 SP1 servers in different environments and are experiencing issues on both. Issues that I haven't seen on Exchange 2013 without SP1. I have 6 healthsets which are unhealthy.  Autodiscover... ActiveSync.P

  • Alot of wi-fi hotspots don't support PPTP VPNs

    Anyone else using a PPTP based VPN having trouble connecting to open wi-fi hotspots like at airports? On my last trip both airports had free wi-fi hotspots but the iphone/touch was unable to connect using my PPTP VPN service. Do some open hotspots bl

  • CS5 Creative Suite unable to download updates

    As the title implies, the Adobe Application Manager alerts me that I have updates for my CS5 Creative Suite software. I tell it to download and install the updates. It gives me errors that simply say the following: Adobe Bridge CS5 4.0.5 Update   The

  • Problem with app downloads after updating to iOS 8

    I Updated my iPad mini to iOS 8. But I am not able to download anything from the App Store. Any solution ?

  • How to create mail group by identity

    I want to manage user at single point. I use identity add user email and portal but it can't create group with email. Now I use commadmin command to create group mail. Can I use identity to do?