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.3.5        Current pre-release: 3.3.6 (2024/03/18)

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.

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}:{w})' polygon[-2] {h},{^},0.6,255,0,255 remove[-1]

Command: image.jpg 2,16,1,1,'u(x?{h}:{w})' polygon[-2] {h},{^},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.