 | | Constructing a webpage
* S L I D E S H O W *
~ Tutorial ~
Several readers have requested details of the front page slideshows. In this article I'll explain the process behind this issue's Mandelbrot animation.
No cost need be incurred although two items of software make the endeavour less stressful: David Pilling's Scanning Software, £30, and WebWonder, £79. The Mandelbrots were generated by The MathMagical Software Company's software suite, £65.
Begin with ten images of identical size - not too big - 300 by 300 pixels is good. Each must have a palette of not more than 256 colours, but ten different palettes is fine. Here is one of the Mandelbrots and its 256 colour palette.

I crop my images to the required size using Paint and alter colour depth using David Pilling's Scanning Software, from CJE Micros, £30. A free (32 bit neutral) update is available from David's website. (v1.24, 3rd Feb 2008)
Use Paint to place the ten images in a single sprite file. Name them as in the following screenshot where the lefthand part of the filenames are consecutive numbers starting from 000, the righthand part is the length of time in centi-seconds for which the image will be displayed and the word between is "delay".

The key piece of free software is InterGif. Click on the advert to the right to obtain it. InterGif takes a RISC OS sprite file and transforms it into a GIF animation suitable for insertion into a web page. Let me talk you through exactly what to do. With InterGif running and its control window visible, tick "Looping animation" and "Join input files".

Click "Palette..." and from the resulting "palette options" window select "Find best 255 colours" then "OK".

Drag-and-drop the single sprite file of images onto the "Input" area of InterGif's control window. Drag-and-drop the GIF icon from the "Output" area to where you'd like to store the animation. The conversion process will begin. It intelligently finds a single best 255 colours palette to apply to the animation. It is producing a file where each successive frame is the difference from the frame before. If you have RISC OS 6, you can look at the resulting animation file in Paint. Some image quality is lost in the conversion but less than you might expect. Every one of the ten Mandelbrot images has a different 256 colour palette, 2560 colours being compacted to 255, and yet you have to look closely to spot the colour degradation in the resulting slideshow.
To insert the animation into a webpage I use WebWonder. It can produce Java Script controlled slide shows although not all browsers - including Safari on the iPhone - can handle this. The method described here is preferable.
HTML savvy readers will add one line of code to an existing webpage to call the GIF animation in the same way as any other image. Alternatively, WebWonder-less readers could save the RISCOScode front page as an HTML directory onto their hard drive. Hunt around for "Mandel/gif". Swap it for a replacement GIF animation file of the same name.
| | 





| |  |