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.1.1 (2026/12/04)

Reference
Table of Contents  ▸  List of Commands  ▸  Reptorian's Commands  ▸  rep_correct_exp_nm◀  rep_import_pdn_txt    |    rep_find_factors_of  ▶

rep_correct_exp_nm

Arguments:

  • _err_out={ 0=stdout | 1=stderr },string

Description:

Sanitize string for use as a file name.

 
Corrections applied:
Remove control characters and any of: ' " # < > : / ? * |
Before the first dot: remove leading and trailing spaces, and collapse repeated spaces.
After the first dot: remove all spaces, collapse repeated dots, and convert to lowercase.
 
Invalid results:
#null_trunc_name: Nothing usable remains after correction.
#reserved_nm: Name before the first dot is reserved by Windows
  (CON, PRN, AUX, NUL, COM0-9, LPT0-9, CLOCK$, CONIN$, CONOUT$; any case).
#exc_out_len: Corrected name is longer than 255 bytes.
 
Note: ${2--1} is treated as a single argument.

Default values:

_err_out=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.