Figuring out how to make the animation of the eclipse from my last post was an interesting process. It ended up taking 3 different programs (not to mention a bunch of dead ends), but I’m quite happy with how it turned out, and it was completely free.
Step 1: Gathering photos
Peter had his camera set up to take a photo every 30 seconds. This meant that I had over 320 raw photos to work with (taken over the course of about 160 minutes). This was untenable to work with for various reasons. So, the first order of business was to cut it down. I went through the folder and copied every 5th or 6th photo into a new folder – I took some liberties here since some of the photos ran out of frame or had a significantly different color spectrum.
As you can see, not a lot of difference between these two frames
Step 2: Centering and cropping
Most astrophotography is done using a motorized mount that compensates for the rotation of the earth or tracks faster-moving objects. We didn’t have one of those for this, so Peter set a fairly wide field of view and just moved the camera manually every 10 or 15 minutes. That meant that the sun was not in the same place in any of the photos. Since I wanted a static shot in the animation, that meant I had to crop it. I spent some time looking into ways to have the computer do this automatically, but eventually decided that it would be faster to do it by hand. So, I turned to IrfanView, which is a freeware photo editor and viewer. This has the option to create a custom crop box with guide lines. I set it at 1100 pixels square, and it turned out that the 1/3 guidelines lined up almost perfectly with the sun. So, I sat down and churned through the 60-some photos I had chosen, setting the cropbox size, centering the sun within it, and saving. (You’ll notice a slight jitter in the final animation – this was because each frame was hand-centered. I could have done another pass to refine it further, but decided that it was close enough that spending another hour or two to fix it wasn’t really worth it.)
The photos after centering and cropping.
Step 3: Compiling Images and Animating
So now I had 60 separate images, but how was I to combine them? I went through probably 10 different GIF-makers online or in the Microsoft store, but none of them worked (seriously, most of those are utter garbage). Some crashed under the strain of that many images, or didn’t allow me to change the timing, or put in a watermark, or applied a terrible compression algorithm, or were so laden with ads that they were unusable – no good whatsoever. Then, I figured out that I could do it in GIMP, which is effectively the free version of Photoshop. I loaded in all of the photos (as separate layers, since that’s the way you can to get it to do animations), and after it crashed a few times due to memory limitations, I finally got them all loaded. I set it to export as a GIF, and…
Nope.
Terrible compression. None of the settings helped. The problem is that a standard GIF file has a very limited color palette—usually only 256 colors—so all of those smooth color gradations turn into a blocky, chunky mess. I was at a loss. Then, as I was scrolling through the export filetypes in GIMP, I noticed the option for MNG animation. This is an almost completely unsupported format, but it gives you high-quality animations (it’s based on the popular PNG image format, but after a brief boom in the early 2000s, pretty much everyone lost interest). So, now I had a high-quality animation, but nothing could view it.
Step 4: Converting
After another Google session, I found that EZGIF happened to have an online MNG to GIF converter. So, I dropped in my unreadable file and out popped this lovely, readable-by-everything GIF.
That’s the stuff.
Something with the way they set it up meant that it didn’t have the artifacting that my previous attempts had (my guess is that it uses a separate 256-color palette for each frame, rather than a single palette for the entire file). From there, it was simply a matter of dropping that into my website, and viola!
I found it quite enjoyable to figure out how to get this to work. Something in my psyche really latches on to the troubleshooting aspect of a problem. Yes, it took a long time, but it didn’t cost anything and I got to learn a new skill, plus I gained a deeper understanding of a bunch of different things (animations, astrophotography, and the history and technical limitations of image formats, among others). Plus, it’s just plain cool.