animated-gif

How to avoid malloc while using CGImageDestinationFinalize

一曲冷凌霜 提交于 2019-12-20 03:42:26
问题 I am trying to programmatically create GIF in iOS, using the following stack's question: Create and and export an animated gif via iOS? My code looks like this: // File Parameters const void *keys[] = { kCGImagePropertyGIFLoopCount }; const void *values[] = { (CFNumberRef) 0 }; CFDictionaryRef params = CFDictionaryCreate(NULL, keys, values, 1, NULL, NULL); const void *keys2[] = { kCGImagePropertyGIFDictionary }; const void *values2[] = { (CFDictionaryRef) params }; CFDictionaryRef

Loading spinner gif image gets stuck

≡放荡痞女 提交于 2019-12-20 03:30:11
问题 I have a 6kb animated gif loading spinner. when I open it in a browser window, it spins fine. But when it opens on an ajax call on my web page, it is stuck. It appears ontime and disappears ontime, but does not spin. Any ideas? Here is the jQuery code: $('#please-wait') .css("visibility", "visible")//.hide() .ajaxStart(function() { $(this).css("visibility", "visible"); }) .ajaxStop(function() { $(this).css("visibility", "hidden"); }); or $('#please-wait') .show() .ajaxStart(function() { $

How can I export CSS animation as animated PNG, gif, or WEBP *with transparency*?

跟風遠走 提交于 2019-12-20 02:38:24
问题 Press "Run code snippet" below to see the animated loading spinner that I want to save. I want to replace all green colors with transparency. Also, I'd like the animation to loop perfectly. I tried recording a screen capture video using OBS and then uploading to https://ezgif.com/video-to-gif and using the "Replace color with transparency" feature, but it didn't remove any green color at all. Also, if exporting canvas animations is easier than capturing CSS animations, I'd accept an answer

How to use animated gif in Firemonkey?

邮差的信 提交于 2019-12-20 02:35:35
问题 How can I use animated GIF in Firemonky. I can load the gif using Timage but it's not animating. I am using Delphi 10.2 tokyo. 回答1: Use TBitmapListAnimation. Place TImage on Form Place TBitmapListAnimation into TImage like on screenshot: Set properties in TBitmapListAnimation AnimationBitmap - You can use online convertorsm that split gif into frames. http://ezgif.com/split http://www.photojoiner.net/merge-photos/editor/# Set another properties: AnimationCount = 8, AnimationRowCount = 1,

How to estimate GIF file size?

无人久伴 提交于 2019-12-19 05:46:49
问题 We're building an online video editing service. One of the features allows users to export a short segment from their video as an animated gif. Imgur has a file size limit of 2Mb per uploaded animated gif. Gif file size depends on number of frames, color depth and the image contents itself: a solid flat color result in a very lightweight gif, while some random colors tv-noise animation would be quite heavy. First I export each video frame as a PNG of the final GIF frame size (fixed, 384x216).

How to decode the application extension block of GIF?

扶醉桌前 提交于 2019-12-19 05:00:32
问题 How to decode the application extension block of GIF? 0000300: 73e7 d639 bdad 10ad 9c08 b5a5 0021 ff0b s..9.........!.. 0000310: 4e45 5453 4341 5045 322e 3003 0100 0000 NETSCAPE2.0..... 0000320: 21f9 0409 1900 f600 2c00 0000 0016 01b7 !.......,....... this " 21 ff0b s..9.........!.. 0000310: 4e45 5453 4341 5045 322e 30 " is known, but what is " 03 0100 0000 "? 回答1: The following describes GIF Netscape Application extension, taken from here. The block is 19 bytes long. First 14 bytes belongs

Onclick play GIF image with jQuery and start from beginning

这一生的挚爱 提交于 2019-12-19 03:59:40
问题 I have a website with images on it. Some of the images are animated GIF images. What I've done is to show a static image of the GIF and on a click event, the actual GIF images is displayed. Here is my code: JQuery $(".theimage").click(function() { $(this).addClass('hidden'); $(this).next().removeClass('hidden'); }); $(".theimage2").click(function() { $(this).addClass('hidden'); $(this).prev().removeClass('hidden'); }); HTML <img class="theimage" src="image_static.gif" alt=""/> <img class=

How to determine the length of a .gif animation in milliseconds

久未见 提交于 2019-12-19 03:59:07
问题 Is there an easy way to figure out approximately how long a .gif image takes to play one time in Javascript? 回答1: The identify command from ImageMagick can give this information: $ identify -verbose file.gif | grep 'Elapsed time' Elapsed time: 0:01.080 Elapsed time: 0:01.150 Elapsed time: 0:01.230 ... Elapsed time: 0:04.250 Elapsed time: 0:04.330 Elapsed time: 0:04.399 Elapsed time: 0:04.480 The last line printed should be the total length of the animation. 回答2: The accepted answer doesn't

Getting the frame duration of an animated GIF?

十年热恋 提交于 2019-12-19 03:11:31
问题 In C#, I can get the individual frames from a gif and show the animation easily enough, but how do you go about getting the timing information for each frame? 回答1: PropertyItem item = img.GetPropertyItem (0x5100); // FrameDelay in libgdiplus // Time is in milliseconds delay = (item.Value [0] + item.Value [1] * 256) * 10; This article may be useful. 来源: https://stackoverflow.com/questions/3785031/getting-the-frame-duration-of-an-animated-gif

Showing a .gif animation in QLabel

北战南征 提交于 2019-12-18 13:14:16
问题 I would like to show a .gif animation in a QLabel widget, alongside text. The following code won't work: self.status_txt = QtGui.QLabel('Loading... <img src="etc/loading.gif">') as the image won't animate. I tried achiving it by using a QMovie object: self.status_txt = QtGui.QLabel("Loading...") movie = QtGui.QMovie("etc/loading.gif") self.status_txt.setMovie(movie) movie.start() But then I can't put the animation and the text together. Is there a different solution besides using two