animated-gif

Delphi TGIFImage animation issue with some GIF viewers

风流意气都作罢 提交于 2019-12-05 01:39:57
I have discovered that animated GIFs created using Delphi 2009's TGIFImage sometimes doesn't play correctly in some GIF viewers. The problem is that the animation is restarted prematurely. Consider the following example: program GIFAnomaly; {$APPTYPE CONSOLE} uses Windows, Types, Classes, SysUtils, Graphics, GIFImg; var g: TGIFImage; bm: TBitmap; procedure MakeFrame(n: integer); var x: Integer; y: Integer; begin for x := 0 to 256 - 1 do for y := 0 to 256 - 1 do bm.Canvas.Pixels[x, y] := RGB((x + n) mod 255, (x + y - 2*n) mod 255, (x*y*n div 500) mod 255); end; var i: integer; begin bm :=

Can I tweet an animated GIF from a UIActivityViewController and the native UIActivityTypePostToTwitter yet?

时间秒杀一切 提交于 2019-12-04 23:28:35
问题 I have a UIActivityViewController sharing an object that conforms to the UIActivityItemSource protocol and offers an animated GIF file by returning an NSURL of a .gif file and CFBridgingRelease(kUTTypeGIF) in the appropriate methods. I see the GIF moving in the Simulator if I share one of my objects in a new Mail message. If I try tweeting the same thing, a frame of the image is attached to the tweet, but it's uploaded as a still image. Do I need to wait for Apple to update

Making animated gifs using R [duplicate]

送分小仙女□ 提交于 2019-12-04 21:45:54
问题 This question already has answers here : Creating a Movie from a Series of Plots in R [closed] (7 answers) Closed 2 years ago . Does anyone have any tips regarding making animated GIFs in R? I'm trying to make some time lapse map GIFs. 回答1: Repeat Question : Please see this previous StackOverflow question on creating a series of plots in R which offers a number of solutions including pointers to other useful packages such as the animation package. 回答2: Also be sure to check out the animation

Converting animated .gif file into a .bmp strip

。_饼干妹妹 提交于 2019-12-04 21:21:37
I was wondering if someone can direct me or guide me in order to use a .gif image and convert it into a .bmp strip image file. First, you need to get the gif's size. Then you need to find out how many frames there are. After that you need to create a new image with Height = original height, and Width = Frames * Gif Width. Then you must paste the original Gif's frames into the strip like so: Frame N starts at pixel N*Width. That is if you're making a horizontal strip. And here is the complete code for a console application: using System.Drawing; using System.Drawing.Imaging; foreach (var arg in

How to add animated gif to a button?

半腔热情 提交于 2019-12-04 18:07:33
Can you tell me how to add an animation gif to a button in c#. Just by adding gif to resources and setting as button image didn't work very well (next frames apear over the previous ones). The problem seems to be in a way how c# is treating transparency but I don't know how to fix it. Thanks in advance. --- edit --- After playing with the gif the issue was with transparency in gif. Next frame was drawn over the previous one so elements I wanted to become transparent in the middle of the animation just didn't do it properly (they still have the color of the previous frame). Solution was to

How to fit content of GIF animation in View and in live wallpaper?

落花浮王杯 提交于 2019-12-04 16:15:31
问题 Background I have a small live wallpaper app, that I want to add support for it to show GIF animations. For this, I've found various solutions. There is the solution of showing a GIF animation in a view (here), and there is even a solution for showing it in a live wallpaper (here). However, for both of them, I can't find how to fit the content of the GIF animation nicely in the space it has, meaning any of the following: center-crop - fits to 100% of the container (the screen in this case),

How to fit GIF file to screen size in android

流过昼夜 提交于 2019-12-04 12:51:36
I am playing gif animation file using movie class, but could not fit within the screen. How to scale or fit gif file to screen size ? I have taken GIF view custom view and playing animation using Movie class. You Can Do this with this code : float scaleWidth = (float) ((screenwidth / (1f*gifwidth)));//add 1f does the trick float scaleHeight = (float) ((screenheight / (1f*gifheight))); canvas.scale(scaleWidth, scaleHeight); mMovie.draw(canvas, 0, 0);//mMovie is my gif picture Try this GifImageView Set Height Width of Movie as screen Height Widht. init() { WindowManager wManager = (WindowManager

Animated GIF does not work on iPhone

左心房为你撑大大i 提交于 2019-12-04 11:37:44
问题 I am using cell.image = an animated gif file (cell is UITableViewCell ). However, it does not animate. Is there any way I can fix it? 回答1: UIImageView provides the necessary APIs to produce your own animations like this: UIImage *frame1 = [UIImage imageNamed:@"frame1.png"]; UIImage *frame2 = [UIImage imageNamed:@"frame2.png"]; UIImage *frame3 = [UIImage imageNamed:@"frame3.png"]; UIImage *frame4 = [UIImage imageNamed:@"frame4.png"]; UIImageView.animationImages = [[NSArray alloc]

Start GIF On Mouse Hover and Pause Otherwise?

☆樱花仙子☆ 提交于 2019-12-04 10:53:14
So I'm trying to have these images on the sidebar of a page I'm building that are static but when you mouseover they animate as gifs. My current setup is to have the background-image css property image be a static jpg normally but change to an animated gif on mouseover. Here's the code, to illustrate my point better. CSS: #segments li a.fnb { background-image: url(http://dl.dropbox.com/u/8808984/2.0/SegmentThumbs/fnb%21-small.jpg); /*fallback*/ } #segments li a.whhu { background-image: url(http://dl.dropbox.com/u/8808984/2.0/SegmentThumbs/still.jpg); } #segments li a.fnb:hover { background

how to make gif image by two bitmaps in android

蓝咒 提交于 2019-12-04 07:37:23
I just want to make animated gif image from 2 bitmap images which i will get from camera and want to mail that gif image. There is native library for that http://jiggawatt.org/badc0de/android/index.html#gifflen I've written a small native lib for Android to do color quantization (from 2-256 colors) of a Bitmap and save the result as a frame in an animated GIF (you can add as many frames as you like). You may hack and slash the library code as you wish to fit your needs. The color quantizer used is Anthony Dekker's NeuQuant, with some modifications made by me. For a java based library try http: