From 8a9daf72efd4e8f00c41b8527a7d2d50ae046efe Mon Sep 17 00:00:00 2001
From: Marc Lehmann <pcg@src.gnome.org>
Date: Fri, 30 Jul 1999 01:21:04 +0000
Subject: [PATCH] *** empty log message ***

---
 ChangeLog                 |  5 +++++
 app/core/gimp-parasites.c |  8 ++++++++
 app/core/gimpparasite.c   |  8 ++++++++
 app/gimpparasite.c        |  8 ++++++++
 docs/parasites.txt        | 26 ++++++++++++++++++++++++++
 5 files changed, 55 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index dc858ffa9c..48dc23363f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 30 02:34:43 CEST 1999  Marc Lehmann <pcg@goof.com>
+
+        * app/gimpparasite.c: I escaped everything when writing out
+        parasites with \, everything except the \ itself. Argh.
+
 Fri Jul 30 02:01:16 CEST 1999  Marc Lehmann <pcg@goof.com>
 
         * docs/parasites.txt: add some suggested colour parasites (no icc
diff --git a/app/core/gimp-parasites.c b/app/core/gimp-parasites.c
index 1b4b7acbae..ac60697dde 100644
--- a/app/core/gimp-parasites.c
+++ b/app/core/gimp-parasites.c
@@ -86,12 +86,20 @@ static void save_func(char *key, Parasite *p, FILE *fp)
 
       fprintf (fp, "(parasite \"%s\" %lu \"", parasite_name (p), parasite_flags (p));
 
+      /*
+       * the current methodology is: never move the parasiterc from one
+       * system to another. If you want to do this you should probably
+       * write out parasites which contain any non-alphanumeric(+some)
+       * characters as \xHH sequences altogether.
+       */
+
       for (s = (gchar *)parasite_data (p), l = parasite_data_size (p);
            l;
            l--, s++)
         {
           switch (*s)
             {
+              case '\\': fputs ("\\\\", fp); break;
               case '\0': fputs ("\\0", fp); break;
               case '"' : fputs ("\\\"", fp); break;
               /* disabled, not portable!  */
diff --git a/app/core/gimpparasite.c b/app/core/gimpparasite.c
index 1b4b7acbae..ac60697dde 100644
--- a/app/core/gimpparasite.c
+++ b/app/core/gimpparasite.c
@@ -86,12 +86,20 @@ static void save_func(char *key, Parasite *p, FILE *fp)
 
       fprintf (fp, "(parasite \"%s\" %lu \"", parasite_name (p), parasite_flags (p));
 
+      /*
+       * the current methodology is: never move the parasiterc from one
+       * system to another. If you want to do this you should probably
+       * write out parasites which contain any non-alphanumeric(+some)
+       * characters as \xHH sequences altogether.
+       */
+
       for (s = (gchar *)parasite_data (p), l = parasite_data_size (p);
            l;
            l--, s++)
         {
           switch (*s)
             {
+              case '\\': fputs ("\\\\", fp); break;
               case '\0': fputs ("\\0", fp); break;
               case '"' : fputs ("\\\"", fp); break;
               /* disabled, not portable!  */
diff --git a/app/gimpparasite.c b/app/gimpparasite.c
index 1b4b7acbae..ac60697dde 100644
--- a/app/gimpparasite.c
+++ b/app/gimpparasite.c
@@ -86,12 +86,20 @@ static void save_func(char *key, Parasite *p, FILE *fp)
 
       fprintf (fp, "(parasite \"%s\" %lu \"", parasite_name (p), parasite_flags (p));
 
+      /*
+       * the current methodology is: never move the parasiterc from one
+       * system to another. If you want to do this you should probably
+       * write out parasites which contain any non-alphanumeric(+some)
+       * characters as \xHH sequences altogether.
+       */
+
       for (s = (gchar *)parasite_data (p), l = parasite_data_size (p);
            l;
            l--, s++)
         {
           switch (*s)
             {
+              case '\\': fputs ("\\\\", fp); break;
               case '\0': fputs ("\\0", fp); break;
               case '"' : fputs ("\\\"", fp); break;
               /* disabled, not portable!  */
diff --git a/docs/parasites.txt b/docs/parasites.txt
index 2f018e580c..01aa8fe251 100644
--- a/docs/parasites.txt
+++ b/docs/parasites.txt
@@ -43,6 +43,32 @@ Global data follows no strict rules.
 "jpeg-save-options" (IMAGE)
         The JpegSaveVals structure from the JPEG plugin.
 
+"gamma" (IMAGE, PERSISTENT)
+	The original gamma this image was created/saved. For JPEG; this is
+        always one, for PNG it's usually taken from the image data. The gimp
+        might use and modify this. The format is an ascii string with the
+        gamma exponent as a flotingpoint value.
+
+        Example: for sRGB images this might contain "0.45454545"
+
+"chromaticity" (IMAGE, PERSISTENT)
+	This parasite contains 8 floatingpoint values (ascii, seperated by
+        whitespace) specifying the x and y coordinates of the whitepoint, the
+        red, green and blue primaries, in this order.
+
+        Example: for sRGB images this might contain
+        "0.3127 0.329 0.64 0.33 0.3 0.6 0.15 0.06"
+         wx     wy    rx   ry   gx  gy  bx   by
+ 
+"rendering-intent" (IMAGE, PERSISTENT)
+	This specifies the rendering intent of the image. It's a value
+        between 0 and 3, again in ascii:
+
+        0 - perceptual			(e.g. for photographs)
+        1 - relative colorimetric	(e.g. for logos)
+        2 - saturation-preserving	(e.g. for business charts)
+        3 - absolute colorimetric
+
 "<plug-in>/_fu_data" (GLOBAL, IMAGE, DRAWABLE, PERSISTENT)
         The Gimp::Fu module might store the arguments of the last plug-in
         invocation. It is usually attached to images, but might also