animated-gif

Generating an animated GIF in Python

落爺英雄遲暮 提交于 2019-11-29 08:07:08
问题 I'm trying to generate an animated GIF using images2gif.py (pastebin to the most recent verson : bit.ly/XMMn5h ). I'm using this Python script: __author__ = 'Robert' from images2gif import writeGif from PIL import Image import os file_names = sorted((fn for fn in os.listdir('.') if fn.endswith('.gif'))) #['animationframa.png', 'animationframb.png', ...] " images = [Image.open(fn) for fn in file_names] size = (150,150) for im in images: im.thumbnail(size, Image.ANTIALIAS) print writeGif.__doc_

python tkinter display animated GIF using PIL

和自甴很熟 提交于 2019-11-29 07:43:47
Is there any way to display an animated GIF in Tkinter using Python Image Library? I thought the ImageSequence module would be the way to do it, but I don't know how to use it and if it's possible. The first question is if there is any easy way. For example: load a GIF using PIL and the ImageSequence and just draw it on a Tkinter window using ImageTk.PhotoImage and it will be animated. Or do I have to set up a function myself, using the after method or something like time.sleep to loop through the GIF frames and draw them on a tkinter window? The second question: even if I have to make a

Indicate that processor-heavy JS function is running (GIF spinners don't animate)

不打扰是莪最后的温柔 提交于 2019-11-29 06:21:21
问题 Showing then hiding animated indicator / spinner gifs are a good way to show a user that their action has worked and that something is happening while they wait for their action to complete - for example, if the action requires loading some data from a server(s) via AJAX. My problem is, if the cause of the slowdown is a processor -intensive function, the gif freezes. In most browsers, the GIF stops animating while the processor-hungry function executes . To a user, this looks like something

How to display animated GIF in Objective C on top of the layered View?

心不动则不痛 提交于 2019-11-29 03:50:04
问题 I am trying to draw animated gif on my screen in mac OSX app . I used this code to insert the gif: I can see the Gif as 1 picture it doesn't animates only static picture :( what should I add to make it animated ? #import <Cocoa/Cocoa.h> #import <Quartz/Quartz.h>//for drawing circle #import "sharedPrefferences.h" @interface GenericFanSubView : NSView { NSColor * _backgroundColor; NSImageView* imageView; } - (void)setBackgroundColor :(NSColor*)color; - (void)insertGif1; - (void)insertGif2; -

How can I create animated gif in Java?

我的未来我决定 提交于 2019-11-29 03:41:12
I would like to create a gif image from the set of BufferedImages. How can I do this? Is there such library in pure Java (ImageMagick is not an option)? I've found Gif4J library but it's not royality-free. Tony I just answer a similar question here , but I think that my solution can help. 'ImageIcon' class allows you to load gif animations. I load the image with 'getResource()'. For doing this I normally us URL class to pass the file path. The path does not need to be necessary in a remote machine as the name URL may suggest. URL url = This.class.getResource(path); Icon myImgIcon = new

how to create gif animation from a stack of jpgs

两盒软妹~` 提交于 2019-11-29 01:10:58
问题 I have around 200 jpg images. I need to stack them so that i can convert them into a simple animated gif image. Are there any free tools available to do that job? My os is windows. I'm not so bothered about the quality of the output. 回答1: Might want to look at GiftedMotion: http://www.onyxbits.de/giftedmotion 回答2: Try using ImageMagick's convert utility. I have used it to create animated gifs from a set of images (in any format) in the past. Use the command convert -delay 20 -loop 0 *.jpg

Why not animated GIF instead of animated CSS sprites?

不问归期 提交于 2019-11-29 00:08:36
问题 In recent trends I've seen people animating CSS sprites using JavaScript instead of using animated GIFs? Ex: http://www.google.com/doodles/eadweard-j-muybridges-182nd-birthday (in fact, Google used this technique in other Doodles too) https://everyme.com/ ('me' logo) and many more... Is that all just to show or experiment with technology or are there any benefits out of it. I m interested in knowing the benefits, if there. The reason I m asking is that I couldn't figure out as in both cases

Recording and saving an SVG animation as an animated GIF [closed]

半城伤御伤魂 提交于 2019-11-28 22:29:50
问题 Is there a library or tool for recording and saving an SVG animation as an animated GIF? The SVG geometries are animated with JavaScript and D3.js, and their colors and opacities are animated with CSS 3. 回答1: I found that simply using a screen capture program with gif recording feature satisfies all my needs, and it is reliable and clean. There are several such screen capture programs. I found LICEcap solid. Here is (almost verbatim) my procedure from question mentioned above: The solution

How do I crop an animated gif using ImageMagick?

雨燕双飞 提交于 2019-11-28 15:52:41
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? jimmetry 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 individually. -coalesce rebuilds the full frames. Other commands will take into consideration the

Create animated gif from a set of jpeg images

南笙酒味 提交于 2019-11-28 15:44:14
问题 I need something that can be scripted on windows 7. This image will be used in banners. 回答1: You can do this with ffmpeg First convert the images to a video: ffmpeg -f image2 -i image%d.jpg video.avi (This will convert the images from the current directory (named image1.jpg, image2.jpg...) to a video file named video.avi.) Then convert the avi to a gif: ffmpeg -i video.avi -pix_fmt rgb24 -loop_output 0 out.gif You can get windows binaries for ffmpeg here. You can also do a similar thing with