GNOME Bugzilla – Bug 161593
Gimp does not save to .xpm image format
Last modified: 2004-12-18 02:23:51 UTC
From Debian bug report http://bugs.debian.org/286164 To Reproduce: Create a new image. Save as .xpm format. Error message: Saving '/tmp/image.xpm' failed: Plug-In could not save image This bug doesn't occur if you open an existing an XPM and re-save it as XPM.
I should note that the error message pops up after the Save dialog's progress bar goes to nearly 100%.
Update from bug submitter: This bug is in due to a recent change in the libXpm library. See the following URLs for details. https://bugs.freedesktop.org/show_bug.cgi?id=1924 "The new sanity checks prevent using file names that start with a "/" which along with other checks wouldn't let you use libXpm to write files that aren't in or beneath the process's current working directory. Not exactly what you want if you use it e.g. from the GIMP's xpm load/save plugin." https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140815 "In xc/extras/Xpm/lib/WrFFrI.c you find this gem: [...] if(len == 0 || filename[0] == '/' || strstr(filename, "../") != NULL || filename[len-1] == '/') return(XpmOpenFailed); [...]"
Closing bug since it's not really worth fixing this in the gimp, so I'll forward this to the Debian X team.