How to add a gif/animation onto Beamer (post Adobe retiring Flash) - animation

I'm having trouble adding a gif onto my Beamer. I've searched for answers but I haven't found one that was written after Adobe retired it's Flash Player.
I've tried using the animate package, and it does compile the file, but it doesn't let me play it (the controls appear, but if I click them nothing happens). I've tried the media9 and movie15 packages, but apparently they are obsolete. So, I am very confused on how to add an animation at this point in time. And honestly, I don't even know if the lack of Adobe Flash Player is the problem. I know there has to be a simple answer.
I don't think it's necessary to add my code, since I feel it's such a trivial matter.
Thanks in advance!

You can split your .gif file into individual images. There are many different converters to be found online or you could use image magick from the command line:
convert -coalesce test.gif test.png
This will result in a series of images called test-0.png etc.
You can then include these in your beamer presentation using the xmpmulti package.
To animate this sequence of slides, you can use \transduration<0-16>{0}. Replace 16 with how many images you have and {0} with the duration in seconds each image should be shown. With 0 seconds from my example, the time will be determined by how long your computer takes to render the slide.
If you now open the presentation with adober reader in presentation mode, the slides will change automatically and thus create an animation.
\documentclass{beamer}
\usepackage{xmpmulti}
\begin{document}
\begin{frame}
\transduration<0-16>{0}
\multiinclude[<+->][format=png, graphics={width=\textwidth}]{test}
\end{frame}
\end{document}
Or if abandoning the pdf format is an option, you could have a look at the media4svg package.

Related

How would I go about swapping different transparent images with others in visual basic 6?

So I have a programming project that I have to do for my school. What I have to do is setup a 2 player dice game. I could have gone the easy way and just display the number of the 2 die, but I was thinking of using images that I made in photoshop instead. However, the problem is that I do not know how to change images in an efficient way.
My first option is using the visibility tag on several images laid on top of eachother and change it accordingly as such
image1.visible = false
image2.visible = true
However, I do not think that is very efficient. Images also do not support changing the image with code from my research.
Secondly, I could use a PictureBox instead, which do support changing the image as the program is running. However, it does not support transparency, and the die images are transparent. Plus it gives me the invalid image file error, I guess due to the transparency in the gif files.
There is also the cheap workaround of me making the background of the images the same as the form background.
So is there a more efficient way I am missing out? I know that the cheap workaround would be the best option for this case, but I would like to have this knowledge for future use like semi-transparent pixels that blend in and such.
And before you ask, no, I cannot use another programming language as visual basic 6 is what my school teaches. Thankfully they are changing it soon, but I am stuck with this for now.
Turns out you CAN change the pictures of Images, while keeping transparency and stretch. I am going to properly show it:
Image1.Picture = LoadPicture("YOURPATHHERE.gif")
This is what I get for believing what I've seen on some forum.
Also, the error of invalid image file was due to the images being corrupted for some reason.

Working with Images in Xamarin App programmig

I am working on a Xamarin App compatible with all devices. I have a general question related to images. I am using Location Mark Image Icons to provide locations available on the Map. My issue is, Image has a white background which is also showing along with its background. I want to show only the Image.
Is this related to the designer to provide the image without background? Or as a developer, I can do something on it.
Xamarin.Forms doesn't delete your white background. What you need to do is following a small tutorial on how to use Adobe Photoshop for example and export your images as png, you might even consider which png type you need, there's 3 types of png:
png8
png24
png32
I won't be going deep in explaining each one of them, but you need to know that they all support transparency and could have a transparent background, however, you might notice some differences between them on the edges.
For example, png8 will give a small white border while png24 will not show that.
You can check this for example: https://helpx.adobe.com/photoshop-elements/using/optimizing-images-png-24-format.html
No, you can't do anything about it using Xamarin.Forms. You need to modify the image and remove the background (using Adobe Photoshop, etc.) and make sure to save it as .png.
If its simple white background you want to remove, You can utilise simple [MakeTransparent][1] method ofBitMap.
But this will remove all white coloured pixel. So IF your logo also contains white color, better you contact your designer.

Creating animated GIF files out of D3.js animations

I am creating D3.js animations, like this: Demo
Let's say I want to present my work here (or on a blog). About the best I can do is post a picture:
On the other hand, if I, let's say, use the Python library Matplotlib for data visualization, I could produce an animated GIF file, and post it here:
I would like to programatically obtain similar animated GIF files out of my D3.js animations. How can I do this?
NOTE: I started working on getting events from d3.transition(), but so far I didn't have any luck.
The solution uses a tool called LICEcap, a screen capture utility for Windows and Mac. Steps are following:
Download LICEcap and install it. Now, if you start this program, it will have a rather unusual shape, just a thin frame, and everything inside the frame will be transparent:
Go to the window with your D3.js animation and prepare everything so that you could start animation at some point. Let's say we want to record this example from d3js.org:
Now start LICEcap and position it over the area you want to have in your animated GIF file:
Make sure that you enter at least 20 FPS in the bottom left edit box, otherwise the recording will be low quality. Press record. A dialog will first appear, and you choose here whether you want your GIF file to be in an infinite loop, or just repeated once, or any number of times. Also an interesting option is to add some visual clues for mouse clicks. Choose also filename, and press Save.
Now you do whatever you have to do to trigger animations. I pressed buttons Grouped and Stacked several times. After I decided it's enough, I pressed Stop. The resulting file is:
That's it!

How to easily crop the same image multiple times

I have a set of really big images out of which I need to crop little snippets. These snippets are all exactly the same size but don't follow a strict pattern so I can't do this programatically.
Ideally I would like to open up one of the big files and be able to point and click on say, the top left corner of a snippet and have that automatically be saved to disk without even having to enter a file name, and then continue on with the rest. (Of course this would be the ideal way which I know is probably way off the real possible way!).
I started doing this in Photoshop CS4 but cropping a snippet, saving, undoing (to get to the full image), and starting over again takes way too long.
Maybe someone has a better way to do this in photoshop or in some other software.
Thanks for reading!
Instead of cropping and undoing, you could:
make (or resize) a selection
copy the selection to a new image
save the image
close the image
You might need to split it into two actions, I don't know enough about programming Photoshop.
Thank you everyone for your input.
I ended up doing this with a suggestion a colleague of mine came up with. It consisted of creating a Photoshop "slice" over the first region I wanted to crop and then cloning that region over the rest of the other sections. After that, using Save For Web (and ofter hitting Continue when PS complained about how that image was way beyond Save For Web's capabilities) I could save all images at once.
This was the fastest and easiest method I could find. Until then I was going with Mark Ransom's method.

How to import GIF files into Beamer presentation?

I need to import animations from Maple into my LaTeX/Beamer presentation. I save a file in GIF format. But later I have problems converting that file into PNG. All I get is a static PNG file and can't proceed ((( What's the full code to do that in LaTeX?
You can use the animate package to animate a series of PNGs. To get the series of PNGs from an animated GIF, use a tool like ImageMagick's convert.
Does this help: LINK? (This is the same answer as marcog... just wanted to provide a reference to it being asked previously -- the solution was the same: the animate package).
Also, your OS will matter. I don't know that Linux (not saying you're using it) has any ability to play animated PDFs. I've tried embedding movies using LaTeX and while it "works," you can't actually view them in anything Linux offers yet. Okular is working on it, but last I checked (couple months?) it's not possible yet.
Anyway, just wanted to add that just in case you were doing everything completely right and by chance are not seeing the fruits of your labor since you're using a Linux viewer. Check your work with Acrobat on Windows to be sure.

Resources