gif

Multiple instances of the same animated GIF in a Canvas (Java)

坚强是说给别人听的谎言 提交于 2019-12-23 18:20:13
问题 So I'm making a game where you can put bombs on the location of your character. Each bomb is associated with a GIF image when the bomb is displayed and eventually go BOOM (think about Bomberman). The problem was, when i tried to paint more than one bomb on the screen, it was painted from the last frame of the GIF. Investigating, I found the method image.flush() to reset the GIF cicle but now the problem is that every time I paint a second bomb on the screen, the GIF cycle is reset for all

Possible to layer ImageIcons?

孤街浪徒 提交于 2019-12-23 17:48:12
问题 I was wondering if it were possible to layer ImageIcons in Java. I will be working with GIF images, and will have a grid of ImageIcons representing the "background" of my JPane. When a certain condition is true, I need to be able to add an image that has transparency on top of the other image. Regards, Jack Hunt 回答1: yes that's possible and there are two correct ways 1) if is there only one Image then put JLabel with Icon to the GlassPane 2) use LayeredPane for <= Java6 (not Java7 user there

Replacing image extensions in jQuery, go from .png to .gif on the fly

一世执手 提交于 2019-12-23 15:53:45
问题 So, I'm using CSS3 in order to create sidebar boxes in my site design, this works nice and dandy. Using http://css3pie.com in order to create the effect in IE. Again, nice and dandy. Now, comes my issue - For each relatively positioned module, there is an absolutely positioned icon within it, that is set to being top: -20px in order to give it a pop-out effect. Obviously this doesn't work in IE6, as well it doesn't play nice with any PNG fix codes. However, for IE6 users I can switch to a low

why showing .GIF image increase memory continuously?

前提是你 提交于 2019-12-23 12:59:38
问题 i am showing simple code sample. I showed an gif image in a Jlabel . When run the programme, TASK manager shows that memory is increasing continuously. Why it happens? Edited: try this code please... on show glass button, glass panel is shown with gif image and a hide glass button in it and with that memory will be started increasing. On clicking hide glass button, glass panel will be hidden and memory increasing will b stopped. @mKorbel : I had debugged it, the constructor will be called

Controlling GIF Animations with Jquery?

孤者浪人 提交于 2019-12-23 12:53:49
问题 Is this possible? I did some google search but don't seem to find anything. What I want would be kind of like a stop/play function to a gif image. Would be awesome. 回答1: No. Gifs are played by the browser. There is nothing you can do about it. The only thing you can do is replace the image with a placeholder. But that will not stop and start the gif at specific locations of the animation, right when you click/toggle. 回答2: https://stackoverflow.com/a/6017468/873792 Unfortunately, the DOM doesn

GIF do not animate when share on twitter

给你一囗甜甜゛ 提交于 2019-12-23 09:39:35
问题 I am creating animated GIF file with NSArray of UIImage . And saving it in NSDocumentDirectory as well as in Photo Album of iPhone. The problem I am facing is, when I open the saved GIF in Email Composer or in iMessage, it animates fine. But when i share it through twitter, it does not animate. I tried sharing through twitter app on iPhone and saw an Interesting thing(ScreenShot below) that The GIFs i downloaded from different websites using Safari shows a label 'GIF' on top left corner of

How to animate GIFs in HTML document?

允我心安 提交于 2019-12-23 07:36:47
问题 I have the following <img> tag in a static HTML document. <img src="foo.gif" alt="This is an animated gif image, but it does not move"/> After I set its src attribute to point to a .gif file (i.e. foo.gif ), the GIF appears as a static (or non-moving) image. How do I animate the GIF? 回答1: By default browser always plays animated gifs, and you can't change that behaviour. If gif image does not animate there can be 2 ways to look: something wrong with the browser, something wrong with the image

jQuery combine a selection of pngs to one image timeline animation

爷,独闯天下 提交于 2019-12-23 04:44:05
问题 Animation is difficult with GIF images due to white borders on text and other pixelation and dithering issues. So I have decided despite the lack of support for PNG on IE especially fadeIn or fadeOut jQuery effects on PNG causing black borders to do it. I have a folder like /cdn.com/ui/photo/1.png /cdn.com/ui/photo/2.png /cdn.com/ui/photo/3.png This is my HTML code, is there anway to add a delay or somehow loop and change the source of say 1-38 and keep looping it - maybe even customize the

Save GIF image from URL to Camera Roll

耗尽温柔 提交于 2019-12-23 03:04:13
问题 I'm trying to save a GIF from URL to Camera Roll with the following code: var image = UIImage(data: NSData(contentsOfURL: self.imageView.sd_imageURL())!) UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil) but after saving, the GIF become a still image, anyone can help me? Thanks! 回答1: Try this: import AssetsLibrary let image = NSData(contentsOfURL: url) ALAssetsLibrary().writeImageDataToSavedPhotosAlbum(image, metadata: nil, completionBlock: { (assetURL: NSURL!, error: NSError!) -> Void in

Set GIF on Background of button

孤街醉人 提交于 2019-12-23 02:28:09
问题 is it possible to apply GIF on background of button.I have tried by the following code by taking the reference from this. And my code is below. public class GIFView extends View { Movie movie, movie1; InputStream is = null, is1 = null; long moviestart; public GIFView(Context context) { super(context); is = context.getResources().openRawResource(+R.drawable.cloudinary_animation);// avoid error ( “Expected resource of type raw”)by + movie = Movie.decodeStream(is); } @Override protected void