XPM exports invalid X Pixmap with path as C identifier (C programming language)
GIMP version: 2.10.12
Note: bug reporters are expected to have verified the bug still exists either in the last stable version of GIMP or on updated development code (master branch).
Operating System: Windows
Package: Installer from gimp.org?
Description of the bug
Can't reasonably use GIMP to edit XPM files, owing having to manually repair the file each save.
See format here (https://en.wikipedia.org/wiki/X_PixMap#XPM3) ... see GIMP's file does not adhere to format:
/* XPM */
static char * C:\Users\Michael\Daedalus 3D\src\pixmap\movetool_xpm[] = {
"22 22 2 1",
" c None",
". c #000000",
" . ",
" ... ",
" ..... ",
" ....... ",
" ......... ",
" ... ",
" . ... . ",
" .. ... .. ",
" ... ... ... ",
" .................... ",
"......................",
" .................... ",
" ... ... ... ",
" .. ... .. ",
" . ... . ",
" ... ",
" ......... ",
" ....... ",
" ..... ",
" ... ",
" . ",
" "};
Reproduction
Is the bug reproducible? [Always]
Reproduction steps:
- Open XPM file.
- Choose File -> Overwrite
- Open overwritten file in text editor. Observe a path is not a C identifier. Identifier is not preserved.
…
Expected result:
Actual result:
Additional information
If you have a backtrace for a crash or a warning, paste it here.