Reference

Table of Contents  ▸  List of Commands  ▸  Values Manipulation  ▸  discard◀  decompress_rle    |    eigen2tensor  ▶

discard

Built-in command

Arguments:

Description:

Discard specified values in selected images or discard neighboring duplicate values,

optionally only for the values along the first of a specified axis.
If no arguments are specified, neighboring duplicate values are discarded.
If all pixels of a selected image are discarded, an empty image is returned.

Examples of use:

• Example #1

$ gmic (1;2;3;4;3;2;1) +discard 2

Command: (1;2;3;4;3;2;1) +discard 2
Command: (1;2;3;4;3;2;1) +discard 2

• Example #2

$ gmic (1,2,2,3,3,3,4,4,4,4) +discard x

Command: (1,2,2,3,3,3,4,4,4,4) +discard x
Command: (1,2,2,3,3,3,4,4,4,4) +discard x