# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- HEAD
+++ Modified In Working Tree
@@ -24,7 +24,7 @@
 
 #include <glib.h>  /* lcms.h uses the "inline" keyword */
 
-#include <lcms.h>
+#include <lcms2.h>
 
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
@@ -428,7 +428,7 @@
         }
     }
 
-  cmsErrorAction (LCMS_ERROR_SHOW);
+//  cmsErrorAction (LCMS_ERROR_SHOW);
 
   switch (proc)
     {
@@ -459,7 +459,7 @@
         gchar *desc = NULL;
         gchar *info = NULL;
 
-        cmsErrorAction (LCMS_ERROR_IGNORE);
+//        cmsErrorAction (LCMS_ERROR_IGNORE);
 
         if (proc == PROC_INFO)
           status = lcms_icc_info (config, image, &name, &desc, &info);
@@ -496,25 +496,59 @@
 static gchar *
 lcms_icc_profile_get_name (cmsHPROFILE profile)
 {
-  return gimp_any_to_utf8 (cmsTakeProductName (profile), -1, NULL);
+  cmsUInt32Number     descSize = 0;
+  gchar               *descData ="";
+
+  descSize = cmsGetProfileInfoASCII(profile, cmsInfoModel, "en", "US", NULL, 0);
+  if (descSize > 0)
+    {
+      descData = (gchar*) g_malloc(descSize + sizeof(gchar));
+      descSize = cmsGetProfileInfoASCII(profile, cmsInfoModel, "en", "US", descData, descSize);
 }
 
+  return gimp_any_to_utf8 (descData, -1, NULL);
+
+//  return gimp_any_to_utf8 (cmsTakeProductName (profile), -1, NULL);
+}
+
 static gchar *
 lcms_icc_profile_get_desc (cmsHPROFILE profile)
 {
-  return gimp_any_to_utf8 (cmsTakeProductDesc (profile), -1, NULL);
+  cmsUInt32Number     descSize = 0;
+  gchar               *descData = "";
+
+  descSize = cmsGetProfileInfoASCII(profile, cmsInfoDescription, "en", "US", NULL, 0);
+  if (descSize > 0)
+    {
+      descData = (gchar*) g_malloc(descSize + sizeof(gchar));
+      descSize = cmsGetProfileInfoASCII(profile, cmsInfoDescription, "en", "US", descData, descSize);
 }
 
+  return gimp_any_to_utf8 (descData, -1, NULL);
+//  return gimp_any_to_utf8 (cmsTakeProductDesc (profile), -1, NULL);
+}
+
 static gchar *
 lcms_icc_profile_get_info (cmsHPROFILE profile)
 {
-  return gimp_any_to_utf8 (cmsTakeProductInfo (profile), -1, NULL);
+  cmsUInt32Number     descSize = 0;
+  gchar               *descData = "";
+
+  descSize = cmsGetProfileInfoASCII(profile, cmsInfoModel, "en", "US", NULL, 0);
+  if (descSize > 0)
+    {
+      descData = (gchar*) g_malloc(descSize + sizeof(gchar));
+      descSize = cmsGetProfileInfoASCII(profile, cmsInfoModel, "en", "US", descData, descSize);
 }
 
+  return gimp_any_to_utf8 (descData, -1, NULL);
+//  return gimp_any_to_utf8 (cmsTakeProductInfo (profile), -1, NULL);
+}
+
 static gboolean
 lcms_icc_profile_is_rgb (cmsHPROFILE profile)
 {
-  return (cmsGetColorSpace (profile) == icSigRgbData);
+  return (cmsGetColorSpace (profile) == cmsSigRgbData);
 }
 
 static GimpPDBStatusType
@@ -738,8 +772,8 @@
       GChecksum *md5 = g_checksum_new (G_CHECKSUM_MD5);
 
       g_checksum_update (md5,
-                         (const guchar *) data + sizeof (icHeader),
-                         len - sizeof (icHeader));
+                         (const guchar *) data + sizeof (cmsICCHeader),
+                         len - sizeof (cmsICCHeader));
 
       len = 16;
       g_checksum_get_digest (md5, digest, &len);
@@ -935,7 +969,7 @@
                           gboolean                  bpc)
 {
   cmsHTRANSFORM  transform   = NULL;
-  DWORD          last_format = 0;
+  cmsUInt32Number  last_format = 0;
   gint          *layers;
   gint           num_layers;
   gint           i;
@@ -945,7 +979,7 @@
   for (i = 0; i < num_layers; i++)
     {
       GimpDrawable *drawable = gimp_drawable_get (layers[i]);
-      DWORD         format;
+      cmsUInt32Number         format;
 
       switch (drawable->bpp)
         {
