animated-gif

Is it possible to embed animated GIFs in PDFs?

怎甘沉沦 提交于 2019-11-28 14:51:34
问题 Is it possible to embed animated GIFs in PDFs? And how might I go about such a thing? are there any dangers I should be aware of? For some more details on why I think it's a good thing and how it helps feel free to see this post. I didn't think it was appropriately well-formed enough for SE. As an example - I'd like to put this into a description of quicksort: 回答1: I haven't tested it but apparently you can add quicktime animations to a pdf (no idea why). So the solution would be to export

Why gif animation doesn't animate when using it in paintComponent()?

纵然是瞬间 提交于 2019-11-28 13:32:23
I'm using paintComponent() to paint a gif animated image at the backgound of JPanel . It shows up the gif but doesn't animate. I use java 1.5 and i know that i can use label with icon. Does any body know why and how to fix it? private static class CirclePanel extends JPanel { ImageIcon imageIcon = new ImageIcon(BarcodeModel.class.getResource("verify.gif")); Point point = f.getLocation(); protected void paintComponent(Graphics g) { Graphics gc = g.create(); Graphics2D g2d = (Graphics2D) g.create(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d

Javascript to only display animated gif when loaded

ε祈祈猫儿з 提交于 2019-11-28 12:57:12
I have an animated gif banner on my website that is around 2MB. For people with slow connections, I want to include some Javascript that will only display (and start playing) this gif when it is fully loaded, so that the rest of the website will already display whilst the gif is still loading. Ideally, I would have one image (loading.gif) be displayed first, and then switched to the banner (banner.gif) with javascript when banner.gif is loaded. How do I do this? (I'm new to Javascript) Thanks! You can do this using an Image object, like so (do this when you want to start loading the banner,

Restart a gif animation without reloading the file

寵の児 提交于 2019-11-28 12:00:28
Is it possible to restart a gif animation without downloading the file every time? My current code looks like this: var img = new Image(); img.src = 'imgages/src/myImage.gif'; $('#id').css('background-image', 'url("' + img.src + '?x=' + Date.now() + '")' ); Edit When I insert the gif into the dom it didn't restart the gif animation. I can only achieve this by appending a random string to the image src but this will download the image again. I want to know if it is possible to restart the gif animation without downloading the gif. Sai Dubbaka I've had similar requirement. var img = document

Loading animated gif from JAR file into ImageIcon

别等时光非礼了梦想. 提交于 2019-11-28 11:14:30
I'm trying to create a ImageIcon from a animated gif stored in a jar file. ImageIcon imageIcon = new ImageIcon(ImageIO.read(MyClass.class.getClassLoader().getResourceAsStream("animated.gif"))); The image loads, but only the first frame of the animated gif. The animation does not play. If I load the animated gif from a file on the filesystem, everything works as expected. The animation plays through all the of frames. So this works: ImageIcon imageIcon = new ImageIcon("/path/on/filesystem/animated.gif"); How can I load an animated gif into an ImageIcon from a jar file? EDIT: Here is a complete

Animated GIF leads to SplashScreen being null

落花浮王杯 提交于 2019-11-28 10:48:20
问题 I know this is probably close to a duplicate of this thread: Animated GIF in Splashscreen But since it seems unanswered and I can't comment on it or anything I'm sorry to repost this but it would be awesome if someone could give me an answer. I am making a game and this game takes quite a lot of time to start. Therefore I want to give the user feedback during the loading screen so he knows the application hasn't crashed. That's why I use the SplashScreen API from java 7. In eclipse, when I

Java: Animated GIFs go automatically partially transparent

懵懂的女人 提交于 2019-11-28 09:03:37
问题 I would like to display a wait dialog with an animated GIF using Java Swing, but the GIFs are displayed incorrectly. Code Example: final JDialog progressDialog = new JDialog(new Frame(), "...", true); URL url = getClass().getResource("wait.gif"); Icon icon = new ImageIcon(url); JLabel label = new JLabel(icon); progressDialog.getContentPane().setBackground(new Color (0, 200, 200)); progressDialog.getContentPane().add(label); progressDialog.pack(); progressDialog.setVisible(true); Original GIF

How do I create an animated gif in Python using Wand?

一笑奈何 提交于 2019-11-28 07:38:06
问题 The instructions are simple enough in the Wand docs for reading a sequenced image (e.g. animated gif, icon file, etc.): >>> from wand.image import Image >>> with Image(filename='sequence-animation.gif') as image: ... len(image.sequence) ...but I'm not sure how to create one. In Ruby this is easy using RMagick , since you have ImageList s. (see my gist for an example.) I tried creating an Image (as the "container") and instantiating each SingleImage with an image path, but I'm pretty sure that

Showing Gif Image with Library

心不动则不痛 提交于 2019-11-28 02:00:35
I am using this library to show gif image: https://github.com/felipecsl/GifImageView But I don't know how to implement my gif image in these code. I have some GifImages in assets folder. Here is my code: PlayActivity.java: import android.app.Activity; import android.os.Bundle; import com.felipecsl.gifimageview.library.GifImageView; import java.io.IOException; import java.io.InputStream; public class PlayActivity extends Activity{ GifImageView gifView; //byte[] bytes; @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout