Index: /ImageMagick/trunk/MagickCore/profile.c
===================================================================
--- /ImageMagick/trunk/MagickCore/profile.c	(revision 7466)
+++ /ImageMagick/trunk/MagickCore/profile.c	(revision 7518)
@@ -5997,5 +5997,5 @@
               case RelativeIntent: intent=INTENT_RELATIVE_COLORIMETRIC; break;
               case SaturationIntent: intent=INTENT_SATURATION; break;
-              default: intent=INTENT_RELATIVE_COLORIMETRIC; break;
+              default: intent=INTENT_PERCEPTUAL; break;
             }
             flags=cmsFLAGS_HIGHRESPRECALC;
Index: /ImageMagick/trunk/MagickCore/image.c
===================================================================
--- /ImageMagick/trunk/MagickCore/image.c	(revision 7493)
+++ /ImageMagick/trunk/MagickCore/image.c	(revision 7518)
@@ -175,5 +175,5 @@
   image->depth=MAGICKCORE_QUANTUM_DEPTH;
   image->colorspace=sRGBColorspace;
-  image->rendering_intent=RelativeIntent;
+  image->rendering_intent=PerceptualIntent;
   image->gamma=0.45455;
   image->chromaticity.red_primary.x=0.6400;
Index: /ImageMagick/trunk/MagickCore/colorspace.c
===================================================================
--- /ImageMagick/trunk/MagickCore/colorspace.c	(revision 7503)
+++ /ImageMagick/trunk/MagickCore/colorspace.c	(revision 7518)
@@ -88,5 +88,5 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  RGBTransformImage() converts the reference image from RGB to an alternate
+%  RGBTransformImage() converts the reference image from sRGB to an alternate
 %  colorspace.  The transformation matrices are not the standard ones: the
 %  weights are rescaled to normalized the range of the transformed values to
@@ -334,9 +334,4 @@
       image->type=image->matte == MagickFalse ? ColorSeparationType :
         ColorSeparationMatteType;
-      return(status);
-    }
-    case Rec601LumaColorspace:
-    case GRAYColorspace:
-    {
       return(status);
     }
@@ -865,12 +860,9 @@
       break;
     }
-    case sRGBColorspace:
-    {
-      /*
-        Nonlinear sRGB to linear RGB (http://www.w3.org/Graphics/Color/sRGB):
-
-          R = 1.0*R+0.0*G+0.0*B
-          G = 0.0*R+1.0*G+0.0*B
-          B = 0.0*R+0.0*G+1.0*B
+    case RGBColorspace:
+    {
+      /*
+        Nonlinear sRGB to linear RGB.
+        Mostly removal of a gamma function, but with a linear component
       */
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
@@ -883,8 +875,8 @@
 
         v=(MagickRealType) i/(MagickRealType) MaxMap;
-        if (((MagickRealType) i/(MagickRealType) MaxMap) <= 0.0031308)
-          v*=12.92f;
+        if (((MagickRealType) i/(MagickRealType) MaxMap) <= 0.04045f)
+          v/=12.92f;
         else
-          v=(MagickRealType) (1.055*pow((double) i/MaxMap,1.0/2.4)-0.055);
+          v=(MagickRealType) pow((((double) i/MaxMap)+0.055)/1.055,2.4);
         x_map[i].x=1.0f*MaxMap*v;
         y_map[i].x=0.0f*MaxMap*v;
@@ -1281,5 +1273,5 @@
 %
 %  TransformRGBImage() converts the reference image from an alternate
-%  colorspace to RGB.  The transformation matrices are not the standard ones:
+%  colorspace to sRGB.  The transformation matrices are not the standard ones:
 %  the weights are rescaled to normalize the range of the transformed values to
 %  be [0..QuantumRange].
@@ -2278,9 +2270,12 @@
       break;
     }
-    case sRGBColorspace:
-    {
-      /*
-        Nonlinear sRGB to linear RGB.
-        Mostly removal of a gamma function, but with a linear component
+    case RGBColorspace:
+    {
+      /*
+        Nonlinear sRGB to linear RGB (http://www.w3.org/Graphics/Color/sRGB):
+
+          R = 1.0*R+0.0*G+0.0*B
+          G = 0.0*R+1.0*G+0.0*B
+          B = 0.0*R+0.0*G+1.0*B
       */
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
@@ -2293,8 +2288,8 @@
 
         v=(MagickRealType) i/(MagickRealType) MaxMap;
-        if (((MagickRealType) i/(MagickRealType) MaxMap) <= 0.04045f)
-          v/=12.92f;
+        if (((MagickRealType) i/(MagickRealType) MaxMap) <= 0.0031308)
+          v*=12.92f;
         else
-          v=(MagickRealType) pow((((double) i/MaxMap)+0.055)/1.055,2.4);
+          v=(MagickRealType) (1.055*pow((double) i/MaxMap,1.0/2.4)-0.055);
         x_map[i].x=1.0f*MaxMap*v;
         y_map[i].x=0.0f*MaxMap*v;
@@ -2556,22 +2551,21 @@
               break;
             }
-            case sRGBColorspace:
+            case RGBColorspace:
             {
               if ((QuantumScale*pixel.red) <= 0.0031308)
                 pixel.red*=12.92f;
               else
-                pixel.red=(MagickRealType) QuantumRange*(1.055*
-                  pow(QuantumScale*pixel.red,(1.0/2.4))-0.055);
+                pixel.red=(MagickRealType) QuantumRange*(1.055*pow(
+                  QuantumScale*pixel.red,(1.0/2.4))-0.055);
               if ((QuantumScale*pixel.green) <= 0.0031308)
                 pixel.green*=12.92f;
               else
-                pixel.green=(MagickRealType) QuantumRange*(1.055*
-                  pow(QuantumScale*pixel.green,(1.0/2.4))-0.055);
+                pixel.green=(MagickRealType) QuantumRange*(1.055*pow(
+                  QuantumScale*pixel.green,(1.0/2.4))-0.055);
               if ((QuantumScale*pixel.blue) <= 0.0031308)
                 pixel.blue*=12.92f;
               else
-                pixel.blue=(MagickRealType) QuantumRange*(1.055*
-                  pow(QuantumScale*pixel.blue,(1.0/2.4))-0.055);
-              break;
+                pixel.blue=(MagickRealType) QuantumRange*(1.055*pow(
+                  QuantumScale*pixel.blue,(1.0/2.4))-0.055);
             }
             default:
@@ -2645,21 +2639,22 @@
             break;
           }
-          case sRGBColorspace:
+          case RGBColorspace:
           {
             if ((QuantumScale*pixel.red) <= 0.0031308)
               pixel.red*=12.92f;
             else
-              pixel.red=(MagickRealType) QuantumRange*(1.055*pow(QuantumScale*
-                pixel.red,(1.0/2.4))-0.055);
+              pixel.red=(MagickRealType) QuantumRange*(1.055*
+                pow(QuantumScale*pixel.red,(1.0/2.4))-0.055);
             if ((QuantumScale*pixel.green) <= 0.0031308)
               pixel.green*=12.92f;
             else
-              pixel.green=(MagickRealType) QuantumRange*(1.055*pow(QuantumScale*
-                pixel.green,(1.0/2.4))-0.055);
+              pixel.green=(MagickRealType) QuantumRange*(1.055*
+                pow(QuantumScale*pixel.green,(1.0/2.4))-0.055);
             if ((QuantumScale*pixel.blue) <= 0.0031308)
               pixel.blue*=12.92f;
             else
-              pixel.blue=(MagickRealType) QuantumRange*(1.055*pow(QuantumScale*
-                pixel.blue,(1.0/2.4))-0.055);
+              pixel.blue=(MagickRealType) QuantumRange*(1.055*
+                pow(QuantumScale*pixel.blue,(1.0/2.4))-0.055);
+            break;
           }
           default:
Index: /ImageMagick/trunk/Magick++/tests/attributes.cpp
===================================================================
--- /ImageMagick/trunk/Magick++/tests/attributes.cpp	(revision 7475)
+++ /ImageMagick/trunk/Magick++/tests/attributes.cpp	(revision 7518)
@@ -1213,9 +1213,9 @@
     // renderingIntent
     //
-    if ( image.renderingIntent() != RelativeIntent )
-      {
-	++failures;
-	cout << "Line: " << __LINE__
-             << ", renderingIntent default is not RelativeIntent as expected"
+    if ( image.renderingIntent() != PerceptualIntent )
+      {
+	++failures;
+	cout << "Line: " << __LINE__
+             << ", renderingIntent default is not PerceptualIntent as expected"
              << endl;
       }
