Applying a mask directly to an image

All programs


This article assumes the reader is familiar with the concept of masks, their uses and how to apply a mask to an image hole on a template. If this is not the case please refer to Applying a mask to an image hole

Background

Before the advent of Version 3 of the software, masks were always template based objects - a mask was applied to an image hole or holes on any template. Version 3 allows the user to add a mask directly to an image. This has a couple of advantages.

  • Different subjects or images can have different masks
  • The mask can be applied automatically to an image by importing a text file
  • Separate templates are not needed
  • The mask will be applied when exporting images

Masks can applied to images in one of two ways:

  1. Setting a mask directly in the Images Mode
  2. Setting a mask by importing a text file

Setting a mask directly in the Images Mode

  1. Select the image or images
  2. From the images menu, select Mask>Set (or use Ctrl-M)
  3. From the pop-up window, browse to and select the desired mask

Once a mask has been set it can be turned on or off as needed

  • To turn off the mask select Images>Mask>Off (Shift-Alt-M)
  • To turn on the mask select Mask>On (Shift-Ctrl-M)

While a mask is turned on for an image it is applied anywhere that image is used. This includes all templates and exports. While a mask is turned off the image behaves as if no mask had been set

Setting a mask while via importing a text file

When importing images via a text file (see Importing Images via a text file), it is possible to set the mask for each image when importing the text file.

Consider the following text file where several images are being imported per subject. The field names are ID, firstname, lastname, grade, image filename and pose respectively.

  • 23432,Joanna,Liederman,8A,100.jpg,1
  • 23432,Joanna,Liederman,8A,101.jpg,2
  • 23432,Joanna,Liederman,8A,102.jpg,3
  • 24534,Bruce,Martin,8A,103.jpg,1
  • 24534,Bruce,Martin,8A,104.jpg,2
  • 24534,Bruce,Martin,8A,105.jpg,3

The photographer wishes to assign a mask to pose 2 for each subject. An extra field is added specifying the desired mask

  • 23432,Joanna,Liederman,8A,100.jpg,1
  • 23432,Joanna,Liederman,8A,101.jpg,2,\\server2\masks\vignette.jog
  • 23432,Joanna,Liederman,8A,102.jpg,3
  • 24534,Bruce,Martin,8A,103.jpg,1
  • 24534,Bruce,Martin,8A,104.jpg,2,\\server2\masks\vignette.jpg
  • 24534,Bruce,Martin,8A,105.jpg,3

Note the use of the full path for each mask (in UNC format in this example). The mask will also be found if it is located in one of these alternative locations meaning only the mask file name is needed, not the path.

  • The same folder as the images
  • The same folder as the currently open job file
  • The jobname#images folder
  • The jobname#graphics folder
  • A path as defined in File>Options>Paths>Graphics

Importing the text file - mapping the fields

The text file is imported as per normal via Details Mode>Subjects>Import text file. The screen grab below shows the import text file setup.

Figure 1: Mapping the text file to import the mask

To import the images ensure the "filename (import images)" option is selected in the "Match with images as well" section. This will present an additional field to map - the Image-id field. In the example above the image-id field is field 5.

To map the mask field ensure the Set>mask option is checked. This will present an additional field to map, the Image-mask field. In the example above the image mask is field 5.

Once a mask has been applied to an image via a text file it can be turned on or off or changed in Images Mode as detailed above.

End of article