Documentation(?!?) of MapZine

The MapZine Applet is called like this

<APP CLASS=mapzine dataurl="http:my.zine" imgurl="http:leute3.gif" selimgurl="http:maske10.gif">

my.zine contains the messages in the pop-up-windows and the URLs, it's format is very simple, just remember that the entries have to be in the order of ascending areanumbers.

The image in leute3.gif can be any image you want. As soon as hotjava supports jpeg one should switch to it for photos like this, since jpeg is usally shorter.

From the picture leute3.gif the mask maske10.gif is made. This is the most complicated step of preparing an own mapzine: Start by coloring each area in a different color. This works best with tools allowing you to define stencils, objects or something like that which prevent you from coloring anything outside their border. Color non-clickable regions black.

After everything is colored, you have to adjust the colors. Area 0 is not clickable and hopefully already black (Red=0, Green=0). The color of Area 1 has to be changed to Red=0,Green=32, Area 2 Red=0,Green=64, .... Area 7 Red=0,Green=224, Area 8 Red=32,Green=0, Area 9 Red=32,Green=32, ...

This scheme is caused by Mapzine's way to interpret colors. It

  1. ignores blue (I thought 63 different areas would be enough)
  2. takes only the 3 most significant bits of green and red (so one can at least partially recognize regions by looking at the mask-file)
  3. makes green's bits the the low 3 bits of the area number, blue's bits the next higher three.
Then you scale the maskimage to 50% (or 25% depends on the definition of scaling of your program), so that each side of the picture is only half as long (Other scale factors could be integrated very easyly with an additional argument). You must then save the mask in a lossless format (so jpeg is out), which mustn't be able to store more than 256x256x256 colors. This is to ensure that no dithering happens, when the mask-image is read in. If you use GIF, best reduce the number of colors (and hence the number of bitmap-layers) to the minimum needed (here: 16) to save space and transfer time.

Was this difficult? Well, at least much easier than figuring out, that hotjava's DIBitmap are not device independent at all, if you read an image with Applet.getImage(). (So much for the gripe about the bad documentation of java's classes)

One last word on compiling this: You need the source of Johan v.d.Hoeven's zine applet, since mapzine inherits from it. You can either get it from him or take this slightly modified version which is guaranteed (well, sort of) to work with mapzine. Please note that there has been a report of mapzine not working with the PC-hotjava. I haven't investigated it. Also this applet is still alpha (sorry for that), so no chance to view it with netscape.


last change: 8.11.95, Markus Baumeister