about summary refs log tree commit diff
path: root/lib/libpnm3.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpnm3.c')
-rw-r--r--lib/libpnm3.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libpnm3.c b/lib/libpnm3.c
index ba408bd1..4d88a2c1 100644
--- a/lib/libpnm3.c
+++ b/lib/libpnm3.c
@@ -240,6 +240,19 @@ pnm_invertxel(xel*   const xP,
 
 
 
+const char *
+pnm_formattypenm(int const format) {
+
+    switch (PPM_FORMAT_TYPE(format)) {
+    case PPM_TYPE: return "PPM"; break;
+    case PGM_TYPE: return "PGM"; break;
+    case PBM_TYPE: return "PBM"; break;
+    default: return "???";
+    }
+}
+
+
+
 void
 pnm_promoteformat(xel ** const xels,
                   int    const cols,