How to import GIF files into Beamer presentation? - animation

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.

Related

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

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.

Create a line animation

I haven't dabbled with animated gifs for a very long time. I'd like to create something similar to this:
https://dribbble.com/shots/2941889-Wind
I can't imageine whoever created this animated frame-by-frame to get that result. So i'd like to know what tools there are for doing something like that? Or perhaps i'm all wrong and the only way to do it is frame-by-frame?
Just some advice where to get started if anyone is able.
So what i did in the end was use Adobe Illustrator to create the paths.
I then changed the stroke to dashed. Modifying the dash i was able to make it appear as thought the line was growing along the path. I then created more paths.
I then created a js file to incrementally increase the dash and save a gif. This created me over 100 snapshots.
Imported these into Adobe Photoshop and export! Bingo!

OSX: automated (every 1-2sec) screenshot (not full screen but (x,y,w,h)) using python

I want to make screenshots on OSX using python. I dont want make full screen shots but only certain rectangles on the screen. Something like (291,305,213,31). I need the correct pixel because afterwards the image files are processed by OCR (python-tesseract) to extract the text.
By the way this is since 6 years the first time I am programming, so far I only know Java a bit. I started yesterday and gave up this morning at 4am. So basically I have no clue yet...For example I still cannot build with Sublime because of path settings, but thats a different story. Cant figure out everything on one day.
I was trying already the following:
- wxPython
But the result are black images, see also:
stackoverflow.com/questions/8644908/take-screenshot-in-python-cross-platform
Additionally it only works in 32-bit mode, but when I do OCR using python-tesseract openCV requires 64-bit....
autopy
when trying to install I got errors, see also:
stackoverflow.com/questions/12993126/errors-while-installing-python-autopy
ImageGrab
only Windows
effbot.org/imagingbook/imagegrab.htm
commandline screencapture
os.system('screencapture test.png')
When I found this I thought, nice but only fullscreen when checking man screencapture. But then I found this: guides.macrumors.c om/screencapture
-R capture screen rect
That would be already enough, but on OSX 10.7.5 I dont have this option. Any ideas?
import Quartz.CoreGraphics
neverfear.org/blog/view/156/OS_X_Screen_capture_from_Python_PyObjC
Create screenshot as CGImage
image = CG.CGWindowListCreateImage(
region,
CG.kCGWindowListOptionOnScreenOnly,
CG.kCGNullWindowID,
CG.kCGWindowImageDefault)
Unfortunately the image is not in file format but a CGImage, no idea how to save as file.
So if possible I would like to use the commandline screencapture with -R if somebody knows how. Just as a start to continue.
Are there any other command line tools available?
What about other libs that I have missed?
Cheers
M
Given that you can get a CGImageRef, you can get its pixel data using the techniques described in Technical Q&A QA1509: Getting the pixel data from a CGImage object. In particular, it shows a function to get the pixel data as a CFDataRef using this function:
CFDataRef CopyImagePixels(CGImageRef inImage) { return CGDataProviderCopyData(CGImageGetDataProvider(inImage)); }
and says:
The pixel data returned by CGDataProviderCopyData has not been color
matched and is in the format that the image is in, as described by the
various CGImageGet functions …
It shows an alternative for getting the pixel data in other formats if you need that.

VS2010 Image library, what is the use of the different size pngs?

The VS2010 image library contains several pngs of standard icons (Warning, Error, ...) in different sizes side by side. What is the use of such a png?
Is it meant as source to cut the best size and save it as new png?
Or is there a way to use such a png and the best resolution is picked automatically. And if so, how is this done?
I wonder why there are such side-by-side images and not several files such as Warning32.png, Warning16.png ....
Example: Information.png
It is an old programming trick and it is exactly what you assume it to be. The bitmap is a "film roll" and to make it work you have to know the pitch of the images, the resource doesn't tell you. Hard-coded in the source code. Microsoft's source code, you got the copy of their work.

Mysterious PNG RGB+Alpha image that works with IE6

http://moztw.org/images/product-front-thunderbird.png
I am sure that this is a PNG image in RGB colors and a alpha channel (look at the shadow below the icon), but this file mysteriously works with IE6 w/o any special CSS hack (though it seems the alpha channel is being replaced by 2-bit mask in IE6).
Can anyone tell me exactly what information is in the file? It would be even better if someone could give a guidance on how to create such file. Thanks.
Edit: Friends at moztw.org added script hack to the website, so the above statement is no longer verifiable. But your are still welcome to investigate the image format.
That's PNG8+alpha. Explanation and examples in "PNG that works" article.
You can generate such files with pngquant (on a Mac, ImageAlpha is a GUI for it).

Resources