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

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.4 (2026/08/19)

Reference
Table of Contents  ▸  List of Commands  ▸  Reptorian's Commands  ▸  rep_weighted_rgb82gray◀  rep_rainbowify    |    rep_hex8args2pal  ▶

rep_weighted_rgb82gray

Arguments:

  • 0%<=red_weight<=100%,0%<=green_weight<=100%,0%<=blue_weight<=100%,_use_weighted_ratio={ 0=no | 1= yes },0<=_minval_weight[%]<=100%,,0<=_maxval_weight[%]<=100%,,0<=_balance_minmax<=1,0<=_endvaladj<=255,-1<=_midgrayadj<=1

Description:

Convert images to grayscale image based on different weights, the usage of min/max val, and post-process value adjustment.

Default values:

_use_weighted_ratio=1,_minval_weight=0%,_maxval_weight=0%,_balance_minmax=50%,_endvaladj=0,_midgrayadj=0


Author: Reptorian.

Example of use:

sp car rep_weighted_rgb82gray 10%,50%,70%,,,,,,-.25

Command: sp car rep_weighted_rgb82gray 10%,50%,70%,,,,,,-.25
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.