G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 3.4.3 (2024/10/11)

Reference

Table of Contents  ▸  List of Commands  ▸  Flow Control  ▸  if◀  foreach    |    local  ▶

if

Built-in command

Arguments:

Description:

Start a if...[elif]...[else]...fi block and test if specified condition holds.

condition is a mathematical expression, whose evaluation is interpreted as { 0:false | other:true }.

This command has a tutorial page.

Example of use:

image.jpg if ia<64 add 50% elif ia<128 add 25% elif ia<192 sub 25% else sub 50% fi cut 0,255

Command: image.jpg if ia<64 add 50% elif ia<128 add 25% elif ia<192 sub 25% else sub 50% fi cut 0,255
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.