animated-gif

PHP - Create simple animated GIF from two JPEG images?

寵の児 提交于 2019-11-27 13:19:53
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. 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 command line, use it. With ImageMagick, it's no problem. ImageMagick v6 Animation basics (from the IM manual)

How do I crop an animated gif using ImageMagick?

瘦欲@ 提交于 2019-11-27 09:24:20
问题 There's plenty of information about cropping images, but attempting to crop (or trim) animations produces strange results. Sometimes they flicker, or come with extra frames, or some frames crop correctly and others become offset. How do I prevent all this from happening? 回答1: convert input.gif -coalesce -repage 0x0 -crop WxH+X+Y +repage output.gif Animated gifs are often optimised to save space, but imagemagick doesn't seem to consider this when applying the crop command and treats each frame

Python: Converting GIF frames to PNG

你说的曾经没有我的故事 提交于 2019-11-27 08:07:06
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) comes out black, # but in the "right shape", i.e. # http://i.stack.imgur.com/5GvzC.png Is this specific to

Why gif animation doesn't animate when using it in paintComponent()?

谁都会走 提交于 2019-11-27 07:46:36
问题 I'm using paintComponent() to paint a gif animated image at the backgound of JPanel . It shows up the gif but doesn't animate. I use java 1.5 and i know that i can use label with icon. Does any body know why and how to fix it? private static class CirclePanel extends JPanel { ImageIcon imageIcon = new ImageIcon(BarcodeModel.class.getResource("verify.gif")); Point point = f.getLocation(); protected void paintComponent(Graphics g) { Graphics gc = g.create(); Graphics2D g2d = (Graphics2D) g

Animated gif only loops once in Chrome and Firefox

痞子三分冷 提交于 2019-11-27 07:17:02
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-loader.gif" title="Loading, please wait..">'; Spektre I was facing the same problem with my GIF encoder

Set Animated .GIF As Background Android

与世无争的帅哥 提交于 2019-11-27 07:07:59
I am new to Android and I am having trouble playing an animated .gif file in the background of my layout. When I run the application the background is a single frame of the animated .gif, just like a picture. I have done research mainly in two areas: The link below is where I got the most help. Android OS Beginning BlogSpot The link below makes me think that the errors I am receiving have something to do with the classes being set to private, public, or protected. Java Forums And Here's The Code ---------------------------------------------------------------------------------------------------

Get youtube animated thumbnail

牧云@^-^@ 提交于 2019-11-27 07:03:27
问题 Is that a way to embed the animated thumbnail from youtube in my website? I am not talking about the static thumbnail but the one that looks like a gif. The animated thumbnail of more or less 3 seconds Thanks 回答1: As of June 2019: 1. Getting static thumbnail images is straightforward They're exposed through the YouTube API and, even better, they follow a very simple and uniform URL structure (more details here). 2. Youtube's animated thumbnails are supported in a limited number of browsers.

iOS 11 animated gif display in UIImageView

拜拜、爱过 提交于 2019-11-27 06:50:20
问题 I thought iOS 11 was supposed to bring, at long last, native support for animated gifs? But I tried this, and I didn't see any animation: let im = UIImage(named:"wireframe.gif")! let iv = UIImageView(image:im) iv.animationImages = [im] // didn't help iv.frame.origin = CGPoint(0,100) iv.frame.size = im.size self.view.addSubview(iv) delay(2) { iv.startAnimating() // nope } How is this supposed to work? 回答1: iOS 11 does bring a native understanding of animated gifs, but that understanding,

How do you display animated GIFs within a jQuery Dialog in IE?

左心房为你撑大大i 提交于 2019-11-27 06:30:20
问题 We have the following code which seems to work just fine in every browser except IE: var d = $('<img src="spinner.gif"/>'); d.dialog({modal:true}); In IE it seems to work just fine except the spinner doesn't spin (it's an animated GIF). What's going on? 回答1: I tried "everything" but animation.gif spinner did not work in jQueryUI modal dialog box. Some browsers were fine but it was Firefox refusing to work. Go figure whats the reason. Then found this super excellent non-img spinner component.

Loading animated gif from JAR file into ImageIcon

戏子无情 提交于 2019-11-27 06:06:10
问题 I'm trying to create a ImageIcon from a animated gif stored in a jar file. ImageIcon imageIcon = new ImageIcon(ImageIO.read(MyClass.class.getClassLoader().getResourceAsStream("animated.gif"))); The image loads, but only the first frame of the animated gif. The animation does not play. If I load the animated gif from a file on the filesystem, everything works as expected. The animation plays through all the of frames. So this works: ImageIcon imageIcon = new ImageIcon("/path/on/filesystem