The lasso (or "free form selection") is an editing tool available, with minor variations, in most digital
image editing software. It is often accessed from the standard main menu (in
Photoshop,
Paint Tool SAI
SAI or is a lightweight raster graphics editor and painting software for Microsoft Windows developed and published by Systemax Software.
Development of the software began on August 2, 2004, and the first alpha version was released on October 1 ...
, and
GIMP
GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized task ...
, as common examples), by clicking the icon of a dotted line shaped like a rope
lasso, from which the common name arises.
Standard operation
The lasso tool operates on the active layer of an image, and is used by
clicking and dragging to trace the edges of a selection. Most software supports multiple closed contours, which can be selected by crossing over the edge path multiple times. It is also typically not necessary to close the shape: releasing the mouse button triggers the software to close any open loop(s) automatically. The area enclosed by the cursor path will remain selected and open to various transform operators (shift, scale, cut, copy, and paste, for example) until elsewhere in the image is clicked. At this point, the lassoed selection will merge with the layer it was selected from.
Characteristics
In contrast to other image selection algorithms such as intelligent scissors, magic wand, or
grabcut, lassoing places no requirements on the image, as the user is free to create any closed path.
Technical description
From an
image processing
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
standpoint, the lasso is fundamentally a
masking tool. The edges of the mask are defined by user input: the path of the cursor while the button is held down. A temporary new active layer is created which contains the logical AND of the masking layer and the active image layer. Meanwhile, the original active layer is masked (logical AND) with the inverse of the lasso selection. This creates the impression that the tool has sliced out a piece of the original image for selective transforms and edits. Most operations available for a full image can now be applied to the temporary active layer.
When the layers are merged, pixels in the temporary active layer will replace the pixels in the active layer with which they coincide. "Empty" pixels are handled in one of two ways depending on whether or not the imaging software supports
alpha compositing. They may take on the value of a default "background" color, or they may continue to be defined as transparent with an alpha channel value of zero.
References
{{Reflist
Graphic design