15.2. ImageMap

In Web sensitive images are frequently used to get some effects when defined areas are enabled by the pointer. Obviously the most used effect is a dynamic link to another web page when one of the sensitive areas is clicked on. This “filter” allows you to design easily sensitive areas within an image. Applications for website design have this as a standard function. In GIMP, you can do this in a similar way.

15.2.1. Overview

This plug-in lets you design graphically and friendly all areas you want to delimit over your displayed image. You get the relevant part of html tags that must be merged into the right place in your page html code. You can define some actions linked to these areas too.

This is a complex tool which is not completely described here (it works about like Web page makers offering this function). However we want to describe here some of the most current handlings. If you want, you can find a more complete descriptions in Grokking the GIMP with the link [GROKKING02].

15.2.2. Activate the filter

From an image window, you can find this filter through Filters → Web → ImageMap…

The window is a small one, but you can magnify it. The main useful areas are:

  • completely on the left are vertically displayed icons, one for pointing, three for calling tools to generate various shape areas, one to edit zone properties, and finally one to erase a selected zone; you can call these functions with the Mapping menu,

  • just on the right is your working area where you can draw all the shapes areas you want with the relevant tools,

  • on the right is displayed an icon vertical set; its use is obvious but a help pop-up gives you some information about each function,

  • finally, even on the right is a display area, as a property list of the created areas. A click on one item of the list selects automatically the corresponding shape in the working area,

15.2.3. Options

Figure 17.409. Imagemap filter options

Imagemap filter options

Imagemap window

15.2.3.1. The Menu Bar

The menu bar is similar to the image window menu bar, only a few menus or menu entries are different:

File

  • Save; Save As

    Contrary to other filters, this plug-in doesn’t make an image but a text file. So you must save your work in a text format.

    [Tip]Tip

    With View → Source you can preview this text file content.

    Open; Open recent

    In the plug-in you can open the saved text file. The areas defined in your file will be loaded and overdisplayed; if the displayed image is not the original one or not with the same size, GIMP will ask you for adapting the scale.

Edit

  • Edit area info

    Figure 17.410. Editing an imagemap area

    Editing an imagemap area

  1. In the settings dialog you can edit the area information of a selected area. This dialog will pop up automatically whenever you create a new area.

View

This menu offers you special functions:

  • Area list

    Here you can hide or show the selection area.

    Source

    Here you see the raw data as you would save it to or read it from a file.

    Color; Grayscale

    You can select the image mode here and work with a Grayscale display.

Mapping

You will seldom use this menu, since you can more easily access selection tools by clicking on icons on the left of the working area.

  • Arrow

    The arrow here represents the Move tool. When activated tool is selected, you can select and move an area on the image.

    With a polygon, you can use the arrow to move one of the red points. Right-click on a segment between two red points to open a pop-up menu that offers, with several others, the possibility to add a new point. If you right-click on a red point, you can remove it.

    Rectangle; Circle; Polygon

    These tools let you create various shape areas: click on the image, move the pointer, and click again.

    Edit Map Info

    Figure 17.411. Editing the imagemap data

    Editing the imagemap data

  1. With this simple dialog you can enter some items, which will be written to the resulting output file; either as comments (Author, Description) or as attribute values of the HTML tags (Image name, Title, Default URL).

Tools

With the “Tools” menu you can create guides and even regularly spaced rectangular areas.

  • Grid; Grid settings

    Figure 17.412. Grid options

    Grid options

  1. Here you can enable and disable the image grid or configure some grid properties.
  2. Use GIMP guides; Create guides
  3. The guide lines are created at the border of the image but can be moved around by clicking on the red squares on each line something similar to the GIMP guide lines. By using the guides you are able to create active rectangles in the image.
  4. Create guides
  5. **Figure 17.413. Guide options**
  6. ![Guide options](/projects/gimp-2.10-en/82f65612735cef54aba26d52cb61d4db.png)
  7. The guide options
  8. Instead of creating geometrical shapes to select the active areas you may use an array of rectangles, each representing an active area, by clicking on the Create guides”. In the menu popping up you set the width and height of the rectangles, the space between them, the number of rows and columns, and the upper and left startpoint for the array. All measures are in pixels. If you are not satisfied with the result you may adjust each rectangle by moving the red squares as usual.
15.2.3.2. The Tool Bar

Most entries here are just shortcuts for some functions already described. Exceptions:

Move to Front; Send to Back

Here you can move an area entry to the bottom (“Move to Front”) or top (“Send to Back”) of the area list.

15.2.3.3. The Working Area

Figure 17.414. The Working Area

The Working Area

In the main area of the imagemap window, on the left side, you will find your working area where you can draw all the shapes areas you want with the relevant tools.

Beside the working area there are vertically displayed icons, one for pointing, three for calling tools to generate various shape areas, one to edit zone properties, and finally one to erase a selected zone; you can call these functions with the Mapping menu too.

[Caution]Caution

Note that the areas should not overlap.

15.2.3.4. The selection area

On the right is a display area, as a property list of the created areas. A click on one item of the list selects automatically the corresponding shape in the working area, then you can modify it.

Beside the display is an icon vertical set; its use is obvious but a help pop-up gives you some information about each function.

Unfortunately, the arrow symbols for moving a list entry up or down do not work here. But of course you carefully avoided to create overlapping areas, so you do not use these functions at all.