animated-gif

Create and export an animated gif via iOS?

我与影子孤独终老i 提交于 2019-11-26 13:56:44
I have a series of user-customized images within an iOS app that are being animated in a simple, frame-by-frame flip book style. My question is this: is there a way to allow users to export their animation as an animated gif? Ideally, I'd like to enable them to email, social share (T/FB) or (worst case..) save an animated gif to their documents folder for retrieval via iTunes. I know how to save a .png to the photo library, and I found a way to record an animation as a QT file ( http://www.cimgf.com/2009/02/03/record-your-core-animation-animation/ ), but I haven't found a way to just kick out

how to create an animated gif in .net

穿精又带淫゛_ 提交于 2019-11-26 12:09:10
Does anyone know how to create an animated gif using c#? Ideally I would have some control over the color reduction used. Is using imagemagick (as an external started process) the best choice? There is a built in .NET class which will encode GIF files. GifBitmapEncode MSDN System.Windows.Media.Imaging.GifBitmapEncoder gEnc = new GifBitmapEncoder(); foreach (System.Drawing.Bitmap bmpImage in images) { var bmp = bmpImage.GetHbitmap(); var src = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( bmp, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); gEnc.Frames.Add

Resize animated GIF file without destroying animation

岁酱吖の 提交于 2019-11-26 11:37:26
I need to resize an animated GIF file without destroying the animation. How can I do it using PHP? Jeremy Stanley if you have imagemagick access, you can do this: system("convert big.gif -coalesce coalesce.gif"); system("convert -size 200x100 coalesce.gif -resize 200x10 small.gif"); this is most likely possible with the imagemagick plugin if you don't have system() access NOTE: this may create a larger filesize though a smaller dimensions image due to coalescing essentially deoptimizing the image. UPDATE: If you don't have ImageMagick access, you should be able to use a combination of the

Can a PictureBox show animated GIF in Windows Application?

99封情书 提交于 2019-11-26 11:18:43
问题 I would like to show a animated gif in .Net Winform. How to do this? I previously used VB 6.0. 回答1: Put a picturebox on a form and then specify a picture file with a Gif extension. Or: Programatically animate a gif Image loading frames into a PictureBox with code, here's the Gif class: VB.NET Public Class GifImage Private gifImage As Image Private dimension As FrameDimension Private frameCount As Integer Private currentFrame As Integer = -1 Private reverse As Boolean Private [step] As Integer

play downloaded Gif image in android

荒凉一梦 提交于 2019-11-26 11:14:29
问题 I\'m downloading GIF image in my app from server and then i\'m showing it with ImageView but it was not animated . is there any other way to play downloaded animated GIF image . Thanks in advance . 回答1: I am using the below custom View instead of Image View. public class SampleView extends View { private Movie mMovie; private long mMovieStart; public SampleView(Context context) { super(context); setFocusable(true); java.io.InputStream is; is = context.getResources().openRawResource(R.drawable

Restart an animated GIF from JavaScript without reloading the image

╄→гoц情女王★ 提交于 2019-11-26 10:55:51
问题 I am creating a slideshow of animations using animated GIFs. I\'m crossfading from one animation to the next. The problem is: the only way I have discovered to ensure that the GIF starts animating from the first frame is to reload it each time it\'s shown. The GIFs are 200KB or so each, which is way too much bandwidth for a continuous slideshow. Here\'s my current code. img and nextimg are <div> tags containing a single <img> each. nextimg_img is the <img> tag corresponding to the next image

Effective gif/image color quantization?

北城余情 提交于 2019-11-26 10:45:08
So I'm trying to encode some animated gif files in my Java application. I've been using some classes/algorithms found online, but none seem to be working well enough. Right now I'm using this quantize class to reduce the colors of an image down to 256: http://www.java2s.com/Code/Java/2D-Graphics-GUI/Anefficientcolorquantizationalgorithm.htm The problem is, it doesn't seem to be very "smart." If I pass in an image with more than 256 colors, it does reduce the color number, but not very well. (Reds turn blue, etc - very obvious errors like this). Are there any other algorithms/libraries for

Play an Animated GIF in python with tkinter

隐身守侯 提交于 2019-11-26 06:49:03
问题 I am wanting to create a virtual pet style game using python3 and tkinter. So far I have the main window and have started putting labels in, but the issue I am having is playing an animated gif. I have searched on here and have found some answers, but they keep throwing errors. The result I found has the index position of the gif using PhotoImage continue through a certain range. # Loop through the index of the animated gif frame2 = [PhotoImage(file=\'images/ball-1.gif\', format = \'gif

Creating animated GIF with ImageIO?

别来无恙 提交于 2019-11-26 06:41:27
问题 Has anybody managed to convince ImageIO to write an animated GIF, and in particular setting the correct metadata? My first attempt is roughly as follows (where b1 and b2 are BufferedImages): ImageTypeSpecifier spec = new ImageTypeSpecifier(b1); ImageWriter wr = ImageIO.getImageWriters(spec, \"GIF\").next(); wr.setOutput(ImageIO.createImageOutputStream(new File(\"C:\\\\Flashing.gif\"))); ImageWriteParam param = wr.getDefaultWriteParam(); IIOMetadata meta = wr.getDefaultImageMetadata(spec,

Stopping GIF Animation Programmatically

与世无争的帅哥 提交于 2019-11-26 03:58:04
I am developing a Twitter application which references to the images directly from Twitter. How can I prevent animated gifs from being played? Using window.stop() at the end of the page does not work for me in Firefox. Is there a better JavaScript hack? Preferable this should work for all browsers Inspired by the answer of @Karussell I wrote Gifffer. Check it out here https://github.com/krasimir/gifffer It automatically adds stop/play control on top of your Gif. This is not a cross browser solution but this worked in firefox and opera (not in ie8 :-/). Taken from here [].slice.apply(document