animated-gif

How to display animation in a JTable cell

非 Y 不嫁゛ 提交于 2019-11-26 21:19:14
问题 I am looking for a way to display an animated progress indicator (animated GIF, a rotating wheel rendered through Java2D etc., no preference here) in a table cell until the value that is to be finally displayed has been computed or retrieved. So far I have just put a static "pending..." text into each cell that is not yet ready to speed up display. As data arrives from a background thread I put it into the appropriate cell and call repaint on the table. With a static label or image this works

Restart animated GIF as background-image

瘦欲@ 提交于 2019-11-26 21:12:57
问题 Is it possible to restart an animated GIF used as background-image ? Consider this HTML: <div id="face"> <div id="eyes"></eyes> </div> And this style: #eyes.blink { background-image:url('blink.gif'); } I would like the blink.gif animation to play every time I add the class blink to #eyes , not just the first time. I expected this to work: function startBlink() { $('#eyes').addClass('blink'); } function stopBlink() { $('#eyes').removeClass('blink'); } The problem is that both Firefox and

How to keep animated gif running while doing intense calculations

故事扮演 提交于 2019-11-26 21:11:37
问题 I have a page which does some intense and long lasting calculations in Javascript. I would like to have a loading animation to tell the user progress is being made. I have an animated gif now, but the whole browser window freezes (and the gif does not play) while the Javascript is running. Then when it's done, it unfreezes. The calculations must be client-side so they cannot be done on a server. Is there a way to keep Javascript from freezing the page and stopping animations from playing

How to extract frames of an animated GIF with PHP

霸气de小男生 提交于 2019-11-26 20:15:43
问题 I search for a long time how to extract frames from an animated GIF with PHP... unfortunaly I just found how to get their duration... I really need to extract the GIF frames and their duration to apply some resize, rotate, etc, on each and then to regenerate the GIF with edited frames ! I don't want to use any software, external library (like ImageMagick), just PHP: in fact I need to allow my class http://phpimageworkshop.com/ to work with animated GIF. If you have any idea, I'm listening you

Show animated GIF

筅森魡賤 提交于 2019-11-26 18:53:00
How do you display an animated GIF in a Java application? Using swing you could simply use a JLabel public static void main(String[] args) throws MalformedURLException { URL url = new URL("<URL to your Animated GIF>"); Icon icon = new ImageIcon(url); JLabel label = new JLabel(icon); JFrame f = new JFrame("Animation"); f.getContentPane().add(label); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.pack(); f.setLocationRelativeTo(null); f.setVisible(true); } For loading animated gifs stored in a source package (in the source code), this worked for me: URL url = MyClass.class.getResource("/res

.gif image doesn't moves on adding it to the JTabbed pane

混江龙づ霸主 提交于 2019-11-26 17:57:49
I have a JFrame. In that i have two containers i.e two JPanel. one Panel holds a image. other holds a JButton. Then these two are added to JTabbedPane. My problem is on using a .gif image the image becomes static as any other normal .jpg image. Can anyone help me with some more ideas? Here is my code: import java.awt.Component; import java.awt.Dimension; import java.awt.Frame; import java.awt.Graphics; import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.io

Animated gif only loops once in Chrome and Firefox

你说的曾经没有我的故事 提交于 2019-11-26 17:38:30
问题 I have an animated gif that I want to display any time a page is loading. When I view the image outside of a browser, the image loops infinitely and works just fine, but whenever I'm displaying the image in a browser, the animation only loops once. Does anyone have any suggestions for making the image loop infinitely? Currently I'm just doing this to make the image appear which does make it appear, but only loops once: document.getElementById('ajaxloader').innerHTML = '<img src="images/ajax

How to resize an animated gif image using C#?

谁都会走 提交于 2019-11-26 17:16:44
问题 Is there a method to create a copy of an animated gif image using C#? What I want is to generate a copy of a given gif image using the height and width parameters that the user provides. I have tried for a couple of hours to accomplish this but the resulting image does not preserve the original animations. 回答1: You need to loop through the frames in the animated GIF and resize each one. May also want to take a look at GifLib. 回答2: Took me a while to find this, but finally found a solution:

PHP - Create simple animated GIF from two JPEG images?

為{幸葍}努か 提交于 2019-11-26 16:18:01
问题 Does anyone know if it's possible to generate an animated GIF from two different JPEG files, displaying one image for x seconds then the other, and so on..? Any advice appreciated. Thanks. 回答1: It's not possible using the standard GD functions that come pre-packed with PHP. There is a class on phpclasses.org for this. I have never used it myself, but it's used by a lot of other packages. Alternatively, if you have access to ImageMagick from PHP, using either the MagickWand library or the

Python: Converting GIF frames to PNG

心已入冬 提交于 2019-11-26 13:59:39
问题 I'm very new to python, trying to use it to split the frames of a GIF into PNG images. # Using this GIF: http://www.videogamesprites.net/FinalFantasy1/Party/Before/Fighter-Front.gif from PIL import Image im = Image.open('Fighter-Front.gif') transparency = im.info['transparency'] im.save('test1.png', transparency=transparency) im.seek(im.tell()+1) transparency = im.info['transparency'] im.save('test2.png', transparency=transparency) # First frame comes out perfect, second frame (test2.png)