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  ▸  Image Drawing  ▸  polygon◀  polka_dots    |    quiver  ▶

polygon

Built-in command

Arguments:

Description:

Draw specified colored N-vertices polygon on selected images.

pattern is an hexadecimal number starting with 0x which can be omitted
even if a color is specified. If a pattern is specified, the polygon is
drawn outlined instead of filled.
Adding a - sign before pattern makes the command draw an open polyline rather than a closed polygon.

Default values:

opacity=1, pattern=(undefined) and color1=0.

Examples of use:

• Example #1

image.jpg polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,0.3,0,255,0 polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,1,0xCCCCCCCC,255

Command: image.jpg polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,0.3,0,255,0 polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,1,0xCCCCCCCC,255

• Example #2

image.jpg 2,16,1,1,'u(x?h#0:w#0)' polygon[-2] [-1],0.6,255,0,255 remove[-1]

Command: image.jpg 2,16,1,1,'u(x?h#0:w#0)' polygon[-2] [-1],0.6,255,0,255 remove[-1]
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.