Please enable JavaScript to view this site.

ESL Documentation

Use the using option, either in the image region definition with the file option, or in a read action statement when you want to associate an image map with an image region. (See Read/Write Statements, later in this section.)

 

For example:

 

string CurrentFile is "mickey.bmp" 

 

integer variable Black   is 0 

integer variable Red     is 1 

integer variable Green   is 2 

integer variable Yellow  is 3 

integer constant Blue    is 4 

integer constant Magenta is 5 

integer constant Cyan    is 6 

integer constant White   is 7

 

imagemap Colormap1 is     # You can use:

    black    red,         # two keywords

    White    Magenta,     # two constants

    Red      Yellow,      # two variables

    4        2            # two literals

 

primary image region One

    size 640 350 at 181 209

    in desktop

    preserve foreground

    file CurrentFile 

    using Colormap1

 

In this example, when Colormap1 is used, everything that was black in the original image becomes red; everything that was white becomes magenta; everything that was red becomes yellow; and everything that was blue becomes green.

 

_img308