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.

Similar Messages

  • Animated gif and page refresh problem

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

    Animated gif and page refresh problem
    Hi There,
    I'm trying to build a simple "Please wait......" screen using jsp and javascript.
    So far all is going well except that my animatate gif keeps refreshing everything the page is refresh.
    Is there a way the i can prevent the body of the page from refreshing?
    below is my sample code:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <jsp:useBean id="StatusBean" class="com1.CandidateRelease" scope="session"/>
    <html>
    <script LANGUAGE="JavaScript">
    function refresh()
    <% if (StatusBean.isRunning()) { %>     
         //setTimeout("refresh()", 1000);
         setTimeout("location='status.jsf'", 1000);
    <% }else{%>
         window.location= "busStopAdmin.jsf";
    <%} %>
    </script>
    <head>
         <script LANGUAGE="JavaScript">     
              refresh();
         </script>     
    </head>
    <body>
         <img id="myImage" src="../img/ojp_wait.gif" alt="" width="151" height="36">
    </body>
    </html>

  • Better use for Fireworks CS6, other than animated gifs and batch process?

    I started using fireworks in the much earlier days of web design back in 2000. Now with Illustrator and Photoshop being the law of the land, fireworks has begun to fade and take a back seat.  Primarily right now i use fireworks just for creating animated gifs and batch process if i have a bunch of images that i would like to re-export or format to my liking.  Does anyone have any other better uses for this program?  detPhx
    I am just looking to utilize this more, since i install it.

    For the web, exported PNG compression is better in FW than PS.
    CS6 FW can now generate code  for CSS3 borders, gradients, Sprites, etc...
    FW can be used for jQuery Mobile Theme skinning
    http://tv.adobe.com/show/learn-fireworks-cs6/
    I still use AI for vector graphics & PS for photo & image manipulation, but FW has some nice features for web designers.
    Nancy O.

  • Program for turning animated .gif and MP3 files to .mov

    I need a program that takes an animated GIF and an MP3 of WAV file and turns them into a .mov file, but I don't have the money for FinalCut. Is there a cheaper (or free) program that can do this thing?

    hello. try mpeg streamclip here -
    http://www.apple.com/downloads/macosx/video/mpegstreamclip.html
    not sure if it'll help, but most users here swear by it for various format conversions. and it's free.

  • How do I open with an animated gif and then go to home page?

    I apologize for the newbie question, but I would like to have
    an animated gif intro to a web page. Is it possible to have the gif
    play and then go to the index file? Or do I need to insert the gif
    into an index file and save the home page as something different?
    If so, how do I get it to go to the home page automatically?
    Any help is appreciated.

    >I apologize for the newbie question, but I would like to
    have an animated
    >gif
    > intro to a web page.
    This is called a 'splash page'. To do it, you'll make your
    default home page
    (index.html/default.html/whatever) this splash page, then
    you'll have then
    sent to whatever other page you want it to go to...either via
    a HREF or a
    META REFRESH tag.
    You can't actually time the refresh to coincide with the gif
    finishing it's
    animation, though. For that, you'd have to use Flash
    animation.
    But keep in mind that this technique is pretty much frowned
    upon these days.
    It's an unecessary barrier betwen your users and your content
    and is seen by
    many as a rather dated/amateur technique.
    -Darrel

  • GetURL Javascript Animated Gif and IE

    Do you know why when calling a JavaScript function
    from inside the Flash using the getURL(),
    the animated gifs stop looping ?
    for example:
    on (rollOver) {
    getURL("javascript: alert('after this the gifs will stop
    animate...');");
    }

    so no one else is having this problem?

  • Flash animation/click and mini slide problem

    Hi,
    we have made a roll over effect with flash and put inot
    Captivate as a single object. This works fine. When using a roll
    over box on this object, the flash animation still works. When we
    made a copy of the flash animation object and want to use another
    Captivate effect, such as the mini slide on the other animation
    object, then the flash animation does not work anymore for both
    objects.
    Any idea?
    Marcus

    Hi Marcus
    Yes, you may have two different objects on a slide. I saw
    something interesting the other day in one of my Captivate classes.
    The attendee had inserted two different slidelets. They both
    worked. She had inserted the second slidelet rollover area in a
    spot the first slidelet covered. She coaxed the user to mouse over
    the rollover trigger for the second slidelet from inside the first
    slidelet. It worked.
    You may also have multiple Rollover Captions and Rollover
    Images on a slide. Image Buttons are another type of "Rollover"
    effect in that different images are swapped in and out as needed
    when mousing over or clicking the buttons.
    So the bottom line here is to say that indeed multiple
    rollover effects do work in Captivate.
    Cheers... Rick

  • N82 Animated SMS and Predictive Text Problems

    I've just got a new N82 and think it's a great phone. I downloaded and installed the Animated SMS program from Nokia's software site and have a couple of problems! The first is that I've set my left direction shortcut to come up with a New Message, now it lists SMS, Email and MMS but no A-SMS, I have to go through the message icon in the main menu. The second problem is that when I open the A-SMS application up and I do use and like Predictive Texting, it doesn't work! Everytime I push a button to start texting nothing displays on the screen and SPELL comes up over the left softkey. Turn off Predictive Texting and it works, very annoying. Anyone else had any problems and anyone know a solution? Have contacted Nokia who haven't got back to me yet.

    you might want to try FA136050 here
    /t5/Software-Updates/Symbian-Anna-Troubleshooting/​td-p/1127953
    but i've always used the * button to scroll through options. once you move off the word it stops being a sequence of key presses and just becomes the letters as is.
    There's no dignity in begging for kudos. Do it for the karma.

  • Adobe Elements 8 and 2   Color Problems?

    I can not get colors for either program.   They show all hotpink and will not respond to change.
    Neither one works    Elements2 was okay until I installed 8  then the color palettes locked to HOTPINK.

    Hi, this is for Adobe Business Catalyst, I will move this into the right section and hopefully people can help you there.

  • 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

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

  • Changing animated gif's colors

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

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

  • Animated GIF. problems in Captivate

    I have been trying to bring in an Animated GIF. into my
    Captivate presentation.
    When I import the animation using Insert> Animation it
    converts the animated gif to a swf file.
    In the preview screen it shows my animated gif with multiple
    colors flashing over and over. It is doing this to all of the
    animated gifs that I am bringing in. My fps is set to 10 within
    Captivate.
    Is there frame restrictions or file size restrictions that is
    causing this error when bringing in an animated gif. Any
    suggestions?

    Hi mikeygilbert23_nap and welcome to our community
    Unfortunately, there are a few different methods used to
    create animated .GIFs. One would think all of them would be created
    simply using different images. Largely this is true. But some
    animation programs allow you to choose different methods for the
    way the screen is painted between frames. Sounds like you may be
    seeing this behavior.
    Not sure what to advise as to how to work past it though.
    Sorry. Hopefully one of the others has a clue.
    Cheers... Rick

  • 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

Maybe you are looking for

  • File adaptor Debugging?

    HI @, I am using a file adaptor which is reading the file and then archiving it after successfull reading .Now what happened that In my scenarion the file got picked up by adaptor and archived also but there is no trace available in the SXMB_MONI I n

  • Adding criteria in advanced search BUG in SAVE SEARCH

    hi i added my criteria in advanceed search and evrythiing works ok. just one thing does not work. when i try to save my search view i get a message error when i add my new custom criteria with a specific value i get the following error : missing righ

  • Configure : add prefix and remove prefix

    Hello. I have 4 pods in our voip netowrk. Each pod have owner PBX system. But they have complex dial plan. So I have to configure as simple as possible. Thus, I have good idea to resolve. In my opinion, I'm gonna give prefix number both of them. Pod-

  • I can't send or receive emails from my Ipad. Support didn't fix it

    I can't send or receive emails. I tried to turn it off and on. I also tried to open all the servers and nothing worked. Please help. This is the older Ipad and I don't want to purchase anything if I don't have to.

  • Cant opened link I got after recieving a serial number for photoshop

    I cant open my download link after entering my redemption code and getting a serial number for photoshop elements. I pressed save and run. it went to my downloads but when I tried to open it nothing happened.